Skip to content

TextStudioVisualSnapshot

StructTextStudioTextStudio
public readonly struct TextStudioVisualSnapshot

Allocation-free visual-source view consumed by style, geometry, compositor, and extension renderers. Buffers remain engine-owned and are valid only until a later source layout publication.

public TextStudioColorSource GetColorSource(in TextStudioVisualGlyph glyph)

Returns the indexed color source for a non-font visual glyph, or null when no valid color-source link exists.

Parameters

Name Type
glyph TextStudio.TextStudioVisualGlyph

Returns

TextStudio.TextStudioColorSource

TryGetFontSource(ulong, out TextStudioVisualFontSource)

Section titled “TryGetFontSource(ulong, out TextStudioVisualFontSource)”
public bool TryGetFontSource(ulong fontIdentity, out TextStudioVisualFontSource source)

Attempts to find a visual font source with non-null appearance data by runtime font identity.

Parameters

Name Type
fontIdentity System.UInt64
source TextStudio.TextStudioVisualFontSource

Returns

System.Boolean

public TextStudioVisualGlyph GetRenderGlyph(int index)

Returns the backend glyph at the supplied index in visual draw order.

Parameters

Name Type
index System.Int32

Returns

TextStudio.TextStudioVisualGlyph

public int GetRenderGlyphIndexForUnit(int unitIndex)

Returns the backend render-glyph index for a semantic unit, or -1 when the unit is outside the snapshot.

Parameters

Name Type
unitIndex System.Int32

Returns

System.Int32

public TextStudioVisualGlyph GetGlyph(int index)

Returns the semantic-unit glyph record at the supplied index, throwing for an uncreated snapshot or invalid index.

Parameters

Name Type
index System.Int32

Returns

TextStudio.TextStudioVisualGlyph

public TextStudioReadOnlyBuffer<TextStudioVisualGlyph> Glyphs { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioVisualGlyph}

public int GlyphCount { get; }

Returns

System.Int32

public TextStudioReadOnlyBuffer<TextStudioVisualGlyph> RenderGlyphs { get; }

Actual backend glyphs in visual draw order, each linked to its semantic text unit.

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioVisualGlyph}

public int RenderGlyphCount { get; }

Returns

System.Int32

public TextStudioVisualCapabilities Capabilities { get; }

Returns

TextStudio.TextStudioVisualCapabilities

public TextStudioVisualVersion Version { get; }

Returns

TextStudio.TextStudioVisualVersion

public Vector4 SourceBounds { get; }

Returns

UnityEngine.Vector4

public TextStudioReadOnlyBuffer<TextStudioVisualFontSource> FontSources { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioVisualFontSource}

public int FontSourceCount { get; }

Returns

System.Int32

public TextStudioReadOnlyBuffer<TextStudioColorSource> ColorSources { get; }

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioColorSource}

public int ColorSourceCount { get; }

Returns

System.Int32

public bool IsCreated { get; }

Returns

System.Boolean