Class RadialGradientBrush
A radial gradient brush, defined by center point and radius.
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing.Processing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public sealed class RadialGradientBrush : GradientBrush
Constructors
| Improve this Doc View SourceRadialGradientBrush(PointF, Single, GradientRepetitionMode, ColorStop[])
Declaration
public RadialGradientBrush(PointF center, float radius, GradientRepetitionMode repetitionMode, params ColorStop[] colorStops)
Parameters
Type | Name | Description |
---|---|---|
PointF | center | The center of the circular gradient and 0 for the color stops. |
Single | radius | The radius of the circular gradient and 1 for the color stops. |
GradientRepetitionMode | repetitionMode | Defines how the colors in the gradient are repeated. |
ColorStop[] | colorStops | the color stops as defined in base class. |
Methods
| Improve this Doc View SourceCreateApplicator<TPixel>(Configuration, GraphicsOptions, ImageFrame<TPixel>, RectangleF)
Creates the applicator for this brush.
Declaration
public override 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. |
Overrides
SixLabors.ImageSharp.Drawing.Processing.Brush.CreateApplicator<TPixel>(Configuration, GraphicsOptions, ImageFrame<TPixel>, RectangleF)
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.
Equals(Brush)
Declaration
public override bool Equals(Brush other)
Parameters
Type | Name | Description |
---|---|---|
Brush | other |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |