Class GradientBrush
- Namespace
- SixLabors.ImageSharp.Drawing.Processing
- Assembly
- SixLabors.ImageSharp.Drawing.dll
Base class for Gradient brushes
public abstract class GradientBrush : Brush, IEquatable<Brush>
- Inheritance
-
GradientBrush
- Implements
- Derived
- Inherited Members
Constructors
GradientBrush(GradientRepetitionMode, params ColorStop[])
Represents a logical configuration of a brush which can be used to source pixel colors.
protected GradientBrush(GradientRepetitionMode repetitionMode, params ColorStop[] colorStops)
Parameters
repetitionModeGradientRepetitionModeDefines how the colors are repeated beyond the interval [0..1]
colorStopsColorStop[]The gradient colors.
Remarks
A brush creates a BrushRenderer<TPixel> that performs the logic for retrieving pixel values for specific locations.
Properties
ColorStops
Gets the color stops for this gradient.
public ReadOnlySpan<ColorStop> ColorStops { get; }
Property Value
ColorStopsArray
Gets the color stops array for use by derived applicators.
protected ColorStop[] ColorStopsArray { get; }
Property Value
RepetitionMode
Gets how the colors are repeated beyond the interval [0..1].
public GradientRepetitionMode RepetitionMode { get; }
Property Value
Methods
Equals(Brush?)
Indicates whether the current object is equal to another object of the same type.
public override bool Equals(Brush? other)
Parameters
otherBrushAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.