using RGB.NET.Core; using RGB.NET.Presets.Textures.Gradients; namespace RGB.NET.Presets.Textures { public abstract class AbstractGradientTexture : AbstractBindable, ITexture { #region Properties & Fields /// /// Gets the gradient drawn by the brush. /// public IGradient Gradient { get; } /// public Size Size { get; } /// public Color this[in Point point] => GetColor(point); /// public Color this[in Rectangle rectangle] => GetColor(rectangle.Center); #endregion #region Constructors protected AbstractGradientTexture(Size size, IGradient gradient) { this.Size = size; this.Gradient = gradient; } #endregion #region Methods protected abstract Color GetColor(in Point point); #endregion } }