Table of Contents

Struct TextHitTestResult

Namespace
Avalonia.Media
Assembly
Avalonia.Base.dll

Holds a hit test result from a TextLayout.

public readonly struct TextHitTestResult : IEquatable<TextHitTestResult>
Implements
Inherited Members

Constructors

TextHitTestResult(CharacterHit, int, bool, bool)

public TextHitTestResult(CharacterHit characterHit, int textPosition, bool isInside, bool isTrailing)

Parameters

characterHit CharacterHit
textPosition int
isInside bool
isTrailing bool

Properties

CharacterHit

Gets the character hit of the hit test result.

public CharacterHit CharacterHit { get; }

Property Value

CharacterHit

IsInside

Gets a value indicating whether the point is inside the bounds of the text.

public bool IsInside { get; }

Property Value

bool

IsTrailing

Gets a value indicating whether the hit is on the trailing edge of the character.

public bool IsTrailing { get; }

Property Value

bool

TextPosition

Gets the index of the hit character in the text.

public int TextPosition { get; }

Property Value

int

Methods

Equals(TextHitTestResult)

public bool Equals(TextHitTestResult other)

Parameters

other TextHitTestResult

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(TextHitTestResult, TextHitTestResult)

public static bool operator ==(TextHitTestResult left, TextHitTestResult right)

Parameters

left TextHitTestResult
right TextHitTestResult

Returns

bool

operator !=(TextHitTestResult, TextHitTestResult)

public static bool operator !=(TextHitTestResult left, TextHitTestResult right)

Parameters

left TextHitTestResult
right TextHitTestResult

Returns

bool