diff --git a/Devices/Keyboard/ColorBrushes/IBrush.cs b/Devices/Keyboard/ColorBrushes/IBrush.cs new file mode 100644 index 0000000..594ad08 --- /dev/null +++ b/Devices/Keyboard/ColorBrushes/IBrush.cs @@ -0,0 +1,10 @@ +using System.Drawing; + +namespace CUE.NET.Devices.Keyboard.ColorBrushes + +{ + public interface IBrush + { + Color getColorAtPoint(Point point); + } +} \ No newline at end of file diff --git a/Devices/Keyboard/ColorBrushes/SolidColorBrush.cs b/Devices/Keyboard/ColorBrushes/SolidColorBrush.cs new file mode 100644 index 0000000..21d0b68 --- /dev/null +++ b/Devices/Keyboard/ColorBrushes/SolidColorBrush.cs @@ -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 + } +} \ No newline at end of file