TextLine Class

Summary

Represents a line of text that is used for text rendering.
Namespace
Avalonia.Media.TextFormatting
Base Types
  • object
graph BT Type-->Base0["object"] Type["TextLine"] class Type type-node

Syntax

public abstract class TextLine

Properties

Name Value Summary
HasCollapsed bool
Gets a value that indicates whether the line is collapsed.
LineMetrics TextLineMetrics
Gets the line metrics.
TextLineBreak TextLineBreak
Gets the state of the line when broken by line breaking process.
TextRange TextRange
Gets the text range that is covered by the line.
TextRuns IReadOnlyList<TextRun>
Gets the text runs.

Methods

Name Value Summary
Collapse(TextCollapsingProperties[]) TextLine
Create a collapsed line based on collapsed text properties.
Draw(DrawingContext) void
Draws the TextLine at the given origin.
GetBackspaceCaretCharacterHit(CharacterHit) CharacterHit
Gets the previous character hit after backspacing.
GetCharacterHitFromDistance(double) CharacterHit
Gets the character hit corresponding to the specified distance from the beginning of the line.
GetDistanceFromCharacterHit(CharacterHit) double
Gets the distance from the beginning of the line to the specified character hit. CharacterHit.
GetNextCaretCharacterHit(CharacterHit) CharacterHit
Gets the next character hit for caret navigation.
GetPreviousCaretCharacterHit(CharacterHit) CharacterHit
Gets the previous character hit for caret navigation.