Struct CharacterHit
Represents information about a character hit within a glyph run.
public readonly struct CharacterHit : IEquatable<CharacterHit>
- Implements
- Inherited Members
Remarks
The CharacterHit structure provides information about the index of the first character that got hit as well as information about leading or trailing edge.
Constructors
CharacterHit(int, int)
Initializes a new instance of the CharacterHit structure.
public CharacterHit(int firstCharacterIndex, int trailingLength = 0)
Parameters
firstCharacterIndex
intIndex of the first character that got hit.
trailingLength
intIn the case of a leading edge, this value is 0. In the case of a trailing edge, this value is the number of code points until the next valid caret position.
Properties
FirstCharacterIndex
Gets the index of the first character that got hit.
public int FirstCharacterIndex { get; }
Property Value
TrailingLength
Gets the trailing length value for the character that got hit.
public int TrailingLength { get; }
Property Value
Methods
Equals(CharacterHit)
public bool Equals(CharacterHit other)
Parameters
other
CharacterHit
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
Operators
operator ==(CharacterHit, CharacterHit)
public static bool operator ==(CharacterHit left, CharacterHit right)
Parameters
left
CharacterHitright
CharacterHit
Returns
operator !=(CharacterHit, CharacterHit)
public static bool operator !=(CharacterHit left, CharacterHit right)
Parameters
left
CharacterHitright
CharacterHit