Class GradientBrush
Base class for Gradient brushes
Inheritance
GradientBrush
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing.Processing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public abstract class GradientBrush : Brush, IEquatable<Brush>
Constructors
| Edit this page View SourceGradientBrush(GradientRepetitionMode, params ColorStop[])
Represents a logical configuration of a brush which can be used to source pixel colors.
Declaration
protected GradientBrush(GradientRepetitionMode repetitionMode, params ColorStop[] colorStops)
Parameters
Type | Name | Description |
---|---|---|
GradientRepetitionMode | repetitionMode | Defines how the colors are repeated beyond the interval [0..1] |
ColorStop[] | colorStops | The gradient colors. |
Remarks
A brush is a simple class that will return an BrushApplicator<TPixel> that will perform the logic for retrieving pixel values for specific locations.
Properties
| Edit this page View SourceColorStops
Gets the list of color stops for this gradient.
Declaration
protected ColorStop[] ColorStops { get; }
Property Value
Type | Description |
---|---|
ColorStop[] |
RepetitionMode
Gets how the colors are repeated beyond the interval [0..1].
Declaration
protected GradientRepetitionMode RepetitionMode { get; }
Property Value
Type | Description |
---|---|
GradientRepetitionMode |
Methods
| Edit this page View SourceEquals(Brush?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public override bool Equals(Brush? other)
Parameters
Type | Name | Description |
---|---|---|
Brush | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Overrides
| Edit this page View SourceGetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |