Class BrushApplicator<TPixel>
Performs the application of an Brush implementation against individual scanlines.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing.Processing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public abstract class BrushApplicator<TPixel> : IDisposable where TPixel : unmanaged, IPixel<TPixel>
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |
Constructors
| Edit this page View SourceBrushApplicator(Configuration, GraphicsOptions, ImageFrame<TPixel>)
Initializes a new instance of the BrushApplicator<TPixel> class.
Declaration
protected BrushApplicator(Configuration configuration, GraphicsOptions options, ImageFrame<TPixel> target)
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration instance to use when performing operations. |
GraphicsOptions | options | The graphics options. |
ImageFrame<TPixel> | target | The target image frame. |
Properties
| Edit this page View SourceConfiguration
Gets the configuration instance to use when performing operations.
Declaration
protected Configuration Configuration { get; }
Property Value
Type | Description |
---|---|
Configuration |
Options
Gets the graphics options
Declaration
protected GraphicsOptions Options { get; }
Property Value
Type | Description |
---|---|
GraphicsOptions |
Target
Gets the target image frame.
Declaration
protected ImageFrame<TPixel> Target { get; }
Property Value
Type | Description |
---|---|
ImageFrame<TPixel> |
Methods
| Edit this page View SourceApply(Span<float>, int, int)
Applies the opacity weighting for each pixel in a scanline to the target based on the pattern contained in the brush.
Declaration
public abstract void Apply(Span<float> scanline, int x, int y)
Parameters
Type | Name | Description |
---|---|---|
Span<float> | scanline | A collection of opacity values between 0 and 1 to be merged with the brushed color value before being applied to the target. |
int | x | The x-position in the target pixel space that the start of the scanline data corresponds to. |
int | y | The y-position in the target pixel space that whole scanline corresponds to. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(bool)
Disposes the object and frees resources for the Garbage Collector.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | Whether to dispose managed and unmanaged objects. |