mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2025-12-12 16:58:29 +00:00
Merge pull request #5 from zlotap/master
Merge for development purposes
This commit is contained in:
commit
54231ec4e8
10
Devices/Keyboard/ColorBrushes/IBrush.cs
Normal file
10
Devices/Keyboard/ColorBrushes/IBrush.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System.Drawing;
|
||||
|
||||
namespace CUE.NET.Devices.Keyboard.ColorBrushes
|
||||
|
||||
{
|
||||
public interface IBrush
|
||||
{
|
||||
Color getColorAtPoint(Point point);
|
||||
}
|
||||
}
|
||||
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