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

NameType
sourceVersionSystem.UInt32
glyphIndexSystem.Int32
resolvedStartSystem.Int32
resolvedLengthSystem.Int32
sourceStartSystem.Int32
sourceLengthSystem.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

NameType
frameTextStudio.TextStudioFrame
glyphIndexSystem.Int32

Returns

TextStudio.TextStudioGlyphIdentity

public bool Equals(TextStudioGlyphIdentity other)

Parameters

NameType
otherTextStudio.TextStudioGlyphIdentity

Returns

System.Boolean

public override bool Equals(object obj)

Parameters

NameType
objSystem.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