// ReSharper disable UnusedMember.Global using System; using System.Drawing; using CUE.NET.Devices.Generic; using CUE.NET.Helper; namespace CUE.NET.Brushes { //TODO DarthAffe 30.09.2015: Like this the brush seems kinda useless. Think about making it cool. /// /// Represents a brush drawing random colors. /// public class RandomColorBrush : AbstractBrush { #region Properties & Fields private Random _random = new Random(); #endregion #region Methods /// /// Gets the color at an specific point assuming the brush is drawn into the given rectangle. /// /// The rectangle in which the brush should be drawn. /// The target (key/point) from which the color should be taken. /// The color at the specified point. protected override CorsairColor GetColorAtPoint(RectangleF rectangle, BrushRenderTarget renderTarget) { return ColorHelper.ColorFromHSV((float)_random.NextDouble() * 360f, 1, 1); } #endregion } }