Table of Contents

Class BrushWorkspace<TPixel>

Namespace
SixLabors.ImageSharp.Drawing.Processing
Assembly
SixLabors.ImageSharp.Drawing.dll

Worker-local scratch workspace used by prepared brushes during row composition.

public sealed class BrushWorkspace<TPixel> : IDisposable where TPixel : unmanaged, IPixel<TPixel>

Type Parameters

TPixel

The target pixel format.

Inheritance
BrushWorkspace<TPixel>
Implements
Inherited Members

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetAmounts(int)

Gets the shared amount buffer for the requested length.

public Span<float> GetAmounts(int length)

Parameters

length int

The number of elements required.

Returns

Span<float>

A slice of the worker-local pooled amount buffer.

GetBlendScratch(int, int)

Gets the shared vector scratch for the requested row length and vector row count.

public Span<Vector4> GetBlendScratch(int length, int vectorRows)

Parameters

length int

The number of pixels in the row.

vectorRows int

The number of temporary vector rows required.

Returns

Span<Vector4>

A slice of the worker-local pooled vector scratch buffer.

GetOverlays(int)

Gets the shared overlay buffer for the requested length.

public Span<TPixel> GetOverlays(int length)

Parameters

length int

The number of elements required.

Returns

Span<TPixel>

A slice of the worker-local pooled overlay buffer.