mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2025-12-12 16:58:29 +00:00
implemented SolidColorBrush
This commit is contained in:
parent
7e307fca9b
commit
6241d262ec
38
Devices/Keyboard/ColorBrushes/SolidColorBrush.cs
Normal file
38
Devices/Keyboard/ColorBrushes/SolidColorBrush.cs
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
|
||||||
|
namespace CUE.NET.Devices.Keyboard.ColorBrushes
|
||||||
|
{
|
||||||
|
public class SolidColorBrush : IBrush
|
||||||
|
{
|
||||||
|
Color color;
|
||||||
|
|
||||||
|
#region Constructors
|
||||||
|
|
||||||
|
public SolidColorBrush(Color color)
|
||||||
|
{
|
||||||
|
this.color = color;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Methods
|
||||||
|
|
||||||
|
public Color getColorAtPoint(Point point)
|
||||||
|
{
|
||||||
|
/* a solid color brush returns the same color no matter the point */
|
||||||
|
return this.color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Color getColor()
|
||||||
|
{
|
||||||
|
return this.color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColor(Color color)
|
||||||
|
{
|
||||||
|
this.color = color;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user