// 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 private Color _color; /// /// Gets or sets the drawn by this . /// public Color Color { get => _color; set => SetProperty(ref _color, value); } #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) => Color; #endregion #region Operators /// /// Converts a to a . /// /// The to convert. public static explicit operator SolidColorBrush(Color color) => new SolidColorBrush(color); /// /// Converts a to a . /// /// The to convert. public static implicit operator Color(SolidColorBrush brush) => brush.Color; #endregion } }