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
TPixelThe 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
lengthintThe number of elements required.
Returns
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
lengthintThe number of pixels in the row.
vectorRowsintThe number of temporary vector rows required.
Returns
GetOverlays(int)
Gets the shared overlay buffer for the requested length.
public Span<TPixel> GetOverlays(int length)
Parameters
lengthintThe number of elements required.
Returns
- Span<TPixel>
A slice of the worker-local pooled overlay buffer.