Skip to main content

TextLineMetrics Structure

Represents a metric for a TextLine objects, that holds information about ascent, descent, line gap, size and origin of the text line.

Definition

Namespace: Avalonia.Media.TextFormatting
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public readonly struct TextLineMetrics : IEquatable<TextLineMetrics>
View Source
InheritanceObjectValueType → TextLineMetrics
ImplementsIEquatable(TextLineMetrics)

Properties

ExtentGets the distance from the top-most to bottom-most black pixel in a line.
HasOverflowedGets a value that indicates whether content of the line overflows the specified paragraph width.
HeightGets the height of a line of text.
NewlineLengthGets the number of newline characters at the end of a line.
OverhangAfterGets the distance that black pixels extend beyond the bottom alignment edge of a line.
OverhangLeadingGets the distance that black pixels extend prior to the left leading alignment edge of the line.
OverhangTrailingGets the distance that black pixels extend following the right trailing alignment edge of the line.
StartGets the distance from the start of a paragraph to the starting point of a line.
TextBaselineGets the distance from the top to the baseline of the line of text.
TrailingWhitespaceLengthGets the number of whitespace code points beyond the last non-blank character in a line.
WidthGets the width of a line of text, excluding trailing whitespace characters.
WidthIncludingTrailingWhitespaceGets the width of a line of text, including trailing whitespace characters.

Methods

GetType()Gets the Type of the current instance.
(Inherited from Object)

See Also

Reference

Avalonia.Media.TextFormatting Namespace