Class EllipticGradientBrush
Gradient Brush with elliptic shape. The ellipse is defined by a center point, a point on the longest extension of the ellipse and the ratio between longest and shortest extension.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing.Processing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public sealed class EllipticGradientBrush : GradientBrush, IEquatable<Brush>
Constructors
| Edit this page View SourceEllipticGradientBrush(PointF, PointF, float, GradientRepetitionMode, params ColorStop[])
Base class for Gradient brushes
Declaration
public EllipticGradientBrush(PointF center, PointF referenceAxisEnd, float axisRatio, GradientRepetitionMode repetitionMode, params ColorStop[] colorStops)
Parameters
Type | Name | Description |
---|---|---|
PointF | center | The center of the elliptical gradient and 0 for the color stops. |
PointF | referenceAxisEnd | The end point of the reference axis of the ellipse. |
float | axisRatio | The ratio of the axis widths. The second axis' is perpendicular to the reference axis and it's length is the reference axis' length multiplied by this factor. |
GradientRepetitionMode | repetitionMode | Defines how the colors of the gradients are repeated. |
ColorStop[] | colorStops | the color stops as defined in base class. |
Methods
| Edit this page 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 : unmanaged, 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
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.