// ReSharper disable MemberCanBePrivate.Global // ReSharper disable AutoPropertyCanBeMadeGetOnly.Global using RGB.NET.Core; namespace RGB.NET.Brushes { /// /// Represents a brush drawing only a single color. /// public class SolidColorBrush : AbstractBrush { #region Properties & Fields /// /// Gets or sets the drawn by this . /// public Color Color { get; set; } #endregion #region Constructors /// /// Initializes a new instance of the class. /// /// The drawn by this . public SolidColorBrush(Color color) { this.Color = color; } #endregion #region Methods /// protected override Color GetColorAtPoint(Rectangle rectangle, BrushRenderTarget renderTarget) { return Color; } #endregion #region Operators /// /// Converts a to a . /// /// The to convert. public static explicit operator SolidColorBrush(Color color) { return new SolidColorBrush(color); } /// /// Converts a to a . /// /// The to convert. public static implicit operator Color(SolidColorBrush brush) { return brush.Color; } #endregion } }