Skip to content

TextStudioGlyphIdentity

StructTextStudioTextStudio
public readonly struct TextStudioGlyphIdentity

Stable semantic identity for one glyph within a compiled source generation.

TextStudioGlyphIdentity(uint, int, int, int, int, int)

Section titled “TextStudioGlyphIdentity(uint, int, int, int, int, int)”
public TextStudioGlyphIdentity(uint sourceVersion, int glyphIndex, int resolvedStart, int resolvedLength, int sourceStart, int sourceLength)

Creates a semantic glyph identity from source and resolved-text coordinates.

Parameters

Name Type
sourceVersion System.UInt32
glyphIndex System.Int32
resolvedStart System.Int32
resolvedLength System.Int32
sourceStart System.Int32
sourceLength System.Int32

public static TextStudioGlyphIdentity FromFrame(in TextStudioFrame frame, int glyphIndex)

Returns the semantic identity of a glyph in a frame, or an invalid identity when unavailable.

Parameters

Name Type
frame TextStudio.TextStudioFrame
glyphIndex System.Int32

Returns

TextStudio.TextStudioGlyphIdentity

public bool Equals(TextStudioGlyphIdentity other)

Parameters

Name Type
other TextStudio.TextStudioGlyphIdentity

Returns

System.Boolean

public override bool Equals(object obj)

Parameters

Name Type
obj System.Object

Returns

System.Boolean

public override int GetHashCode()

Returns

System.Int32

public uint SourceVersion { get; }

Returns

System.UInt32

public int GlyphIndex { get; }

Returns

System.Int32

public int ResolvedStart { get; }

Returns

System.Int32

public int ResolvedLength { get; }

Returns

System.Int32

public int SourceStart { get; }

Returns

System.Int32

public int SourceLength { get; }

Returns

System.Int32

public bool IsValid { get; }

Returns

System.Boolean