Class GradientBrush
Base class for Gradient brushes
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing.Processing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public abstract class GradientBrush : IBrush
Constructors
| Improve this Doc View SourceGradientBrush(GradientRepetitionMode, ColorStop[])
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. |
Properties
| Improve this Doc 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
| Improve this Doc View SourceCreateApplicator<TPixel>(Configuration, GraphicsOptions, ImageFrame<TPixel>, RectangleF)
Creates the applicator for this brush.
Declaration
public abstract BrushApplicator<TPixel> CreateApplicator<TPixel>(Configuration configuration, GraphicsOptions options, ImageFrame<TPixel> source, RectangleF region)
where TPixel : struct, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration instance to use when performing operations. |
GraphicsOptions | options | The graphic options. |
ImageFrame<TPixel> | source | The source image. |
RectangleF | region | The region the brush will be applied to. |
Returns
Type | Description |
---|---|
BrushApplicator<TPixel> | The BrushApplicator<TPixel> for this brush. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel type. |
Remarks
The region
when being applied to things like shapes would usually be the
bounding box of the shape not necessarily the bounds of the whole image.