TextStudioVisualSnapshot
public readonly struct TextStudioVisualSnapshotAllocation-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.
Methods
Section titled “Methods”
GetColorSource(in TextStudioVisualGlyph)
Section titled “GetColorSource(in TextStudioVisualGlyph)”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
GetRenderGlyph(int)
Section titled “GetRenderGlyph(int)”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
GetRenderGlyphIndexForUnit(int)
Section titled “GetRenderGlyphIndexForUnit(int)”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
GetGlyph(int)
Section titled “GetGlyph(int)”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
Properties
Section titled “Properties”
Glyphs
Section titled “Glyphs”public TextStudioReadOnlyBuffer<TextStudioVisualGlyph> Glyphs { get; }Returns
TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioVisualGlyph}
GlyphCount
Section titled “GlyphCount”public int GlyphCount { get; }Returns
System.Int32
RenderGlyphs
Section titled “RenderGlyphs”public TextStudioReadOnlyBuffer<TextStudioVisualGlyph> RenderGlyphs { get; }Actual backend glyphs in visual draw order, each linked to its semantic text unit.
Returns
TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioVisualGlyph}
RenderGlyphCount
Section titled “RenderGlyphCount”public int RenderGlyphCount { get; }Returns
System.Int32
Capabilities
Section titled “Capabilities”public TextStudioVisualCapabilities Capabilities { get; }Returns
TextStudio.TextStudioVisualCapabilities
Version
Section titled “Version”public TextStudioVisualVersion Version { get; }Returns
TextStudio.TextStudioVisualVersion
SourceBounds
Section titled “SourceBounds”public Vector4 SourceBounds { get; }Returns
UnityEngine.Vector4
FontSources
Section titled “FontSources”public TextStudioReadOnlyBuffer<TextStudioVisualFontSource> FontSources { get; }Returns
TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioVisualFontSource}
FontSourceCount
Section titled “FontSourceCount”public int FontSourceCount { get; }Returns
System.Int32
ColorSources
Section titled “ColorSources”public TextStudioReadOnlyBuffer<TextStudioColorSource> ColorSources { get; }Returns
TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioColorSource}
ColorSourceCount
Section titled “ColorSourceCount”public int ColorSourceCount { get; }Returns
System.Int32
IsCreated
Section titled “IsCreated”public bool IsCreated { get; }Returns
System.Boolean