Skip to main content

Class SparseRenderContext

Namespace: VelloSharp
Assembly: VelloSharp.dll

public sealed class SparseRenderContext : IDisposable

Inheritance

objectSparseRenderContext

Implements

IDisposable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

SparseRenderContext(ushort, ushort, SparseRenderContextOptions?)

public SparseRenderContext(ushort width, ushort height, SparseRenderContextOptions? options = null)

Parameters

width ushort

height ushort

options SparseRenderContextOptions?

Properties

Height

public ushort Height { get; }

Property Value

ushort

IsMultithreadingEnabled

Gets a value indicating whether multithreaded rendering was requested for this context.

public bool IsMultithreadingEnabled { get; }

Property Value

bool

SimdLevel

Gets the SIMD level requested when the context was created.

public SparseSimdLevel SimdLevel { get; }

Property Value

SparseSimdLevel

ThreadCountOverride

Gets the explicit worker thread count requested for the context. A value of 0 indicates that the renderer should choose automatically or fall back to single-threaded mode when multithreading is disabled.

public ushort ThreadCountOverride { get; }

Property Value

ushort

Width

public ushort Width { get; }

Property Value

ushort

Methods

Dispose()

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

public void Dispose()

DrawGlyphRun(Font, ReadOnlySpan<Glyph>, GlyphRunOptions)

public void DrawGlyphRun(Font font, ReadOnlySpan<Glyph> glyphs, GlyphRunOptions options)

Parameters

font Font

glyphs ReadOnlySpan<Glyph>

options GlyphRunOptions

DrawImage(Image, Matrix3x2)

public void DrawImage(Image image, Matrix3x2 transform)

Parameters

image Image

transform Matrix3x2

DrawImage(ImageBrush, Matrix3x2)

public void DrawImage(ImageBrush brush, Matrix3x2 transform)

Parameters

brush ImageBrush

transform Matrix3x2

FillPath(PathBuilder, FillRule, Matrix3x2, RgbaColor)

public void FillPath(PathBuilder path, FillRule fillRule, Matrix3x2 transform, RgbaColor color)

Parameters

path PathBuilder

fillRule FillRule

transform Matrix3x2

color RgbaColor

FillPath(PathBuilder, FillRule, Matrix3x2, Brush, Matrix3x2?)

public void FillPath(PathBuilder path, FillRule fillRule, Matrix3x2 transform, Brush brush, Matrix3x2? brushTransform = null)

Parameters

path PathBuilder

fillRule FillRule

transform Matrix3x2

brush Brush

brushTransform Matrix3x2?

FillRect(double, double, double, double, RgbaColor)

public void FillRect(double x, double y, double width, double height, RgbaColor color)

Parameters

x double

y double

width double

height double

color RgbaColor

~SparseRenderContext()

protected ~SparseRenderContext()

Flush()

public void Flush()

PopLayer()

public void PopLayer()

PushLayer(PathBuilder, LayerBlend, Matrix3x2, float)

public void PushLayer(PathBuilder clip, LayerBlend blend, Matrix3x2 transform, float alpha = 1)

Parameters

clip PathBuilder

blend LayerBlend

transform Matrix3x2

alpha float

RenderTo(Span<byte>, SparseRenderMode)

public void RenderTo(Span<byte> destination, SparseRenderMode mode = SparseRenderMode.OptimizeSpeed)

Parameters

destination Span<byte>

mode SparseRenderMode

Reset()

public void Reset()

ResetPaintTransform()

public void ResetPaintTransform()

ResetTransform()

public void ResetTransform()

SetAliasingThreshold(byte?)

public void SetAliasingThreshold(byte? threshold)

Parameters

threshold byte?

SetFillRule(FillRule)

public void SetFillRule(FillRule fillRule)

Parameters

fillRule FillRule

SetPaintTransform(Matrix3x2)

public void SetPaintTransform(Matrix3x2 transform)

Parameters

transform Matrix3x2

SetSolidPaint(RgbaColor)

public void SetSolidPaint(RgbaColor color)

Parameters

color RgbaColor

SetStroke(StrokeStyle)

public void SetStroke(StrokeStyle style)

Parameters

style StrokeStyle

SetTransform(Matrix3x2)

public void SetTransform(Matrix3x2 transform)

Parameters

transform Matrix3x2

StrokePath(PathBuilder, StrokeStyle, Matrix3x2, RgbaColor)

public void StrokePath(PathBuilder path, StrokeStyle style, Matrix3x2 transform, RgbaColor color)

Parameters

path PathBuilder

style StrokeStyle

transform Matrix3x2

color RgbaColor

StrokePath(PathBuilder, StrokeStyle, Matrix3x2, Brush, Matrix3x2?)

public void StrokePath(PathBuilder path, StrokeStyle style, Matrix3x2 transform, Brush brush, Matrix3x2? brushTransform = null)

Parameters

path PathBuilder

style StrokeStyle

transform Matrix3x2

brush Brush

brushTransform Matrix3x2?

StrokeRect(double, double, double, double)

public void StrokeRect(double x, double y, double width, double height)

Parameters

x double

y double

width double

height double