Table of Contents

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

TPixel

The 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

configuration Configuration

The configuration instance to use when performing operations.

options GraphicsOptions

The graphics options.

canvasWidth int

The canvas width for the current render pass.

Properties

CanvasWidth

Gets the canvas width for the current render pass.

protected int CanvasWidth { get; }

Property Value

int

Configuration

Gets the configuration instance to use when performing operations.

protected Configuration Configuration { get; }

Property Value

Configuration

Options

Gets the graphics options.

protected GraphicsOptions Options { get; }

Property Value

GraphicsOptions

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

destinationRow Span<TPixel>

The destination row slice to shade.

scanline ReadOnlySpan<float>

The coverage values for the current destination scanline.

x int

The x-position in the target pixel space that the start of the scanline data corresponds to.

y int

The y-position in the target pixel space that the scanline corresponds to.

workspace BrushWorkspace<TPixel>

The worker-local scratch workspace for temporary blending buffers.