Class BrushRenderer<TPixel>
- Namespace
- SixLabors.ImageSharp.Drawing.Processing
- Assembly
- SixLabors.ImageSharp.Drawing.dll
Renders a Brush against individual coverage scanlines.
public abstract class BrushRenderer<TPixel> where TPixel : unmanaged, IPixel<TPixel>
Type Parameters
TPixelThe pixel format.
- Inheritance
-
BrushRenderer<TPixel>
- Inherited Members
Constructors
BrushRenderer(Configuration, GraphicsOptions, int)
Initializes a new instance of the BrushRenderer<TPixel> class.
protected BrushRenderer(Configuration configuration, GraphicsOptions options, int canvasWidth)
Parameters
configurationConfigurationThe configuration instance to use when performing operations.
optionsGraphicsOptionsThe graphics options.
canvasWidthintThe canvas width for the current render pass.
Properties
CanvasWidth
Gets the canvas width for the current render pass.
protected int CanvasWidth { get; }
Property Value
Configuration
Gets the configuration instance to use when performing operations.
protected Configuration Configuration { get; }
Property Value
Options
Gets the graphics options.
protected GraphicsOptions Options { get; }
Property Value
Methods
Apply(Span<TPixel>, ReadOnlySpan<float>, int, int, BrushWorkspace<TPixel>)
Applies the opacity weighting for each pixel in a scanline to the target based on the pattern contained in the brush.
public abstract void Apply(Span<TPixel> destinationRow, ReadOnlySpan<float> scanline, int x, int y, BrushWorkspace<TPixel> workspace)
Parameters
destinationRowSpan<TPixel>The destination row slice to shade.
scanlineReadOnlySpan<float>The coverage values for the current destination scanline.
xintThe x-position in the target pixel space that the start of the scanline data corresponds to.
yintThe y-position in the target pixel space that the scanline corresponds to.
workspaceBrushWorkspace<TPixel>The worker-local scratch workspace for temporary blending buffers.