From 6241d262ec198c5c457c3befd33fc793e78416b3 Mon Sep 17 00:00:00 2001 From: zlotap Date: Tue, 22 Sep 2015 17:05:26 +0200 Subject: [PATCH] implemented SolidColorBrush --- .../Keyboard/ColorBrushes/SolidColorBrush.cs | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Devices/Keyboard/ColorBrushes/SolidColorBrush.cs 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