Skip to main content

TextLineMetrics Struct

Definition

Assembly:Avalonia.Base
Package:Avalonia

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

public struct TextLineMetrics

Inheritance: ValueType -> TextLineMetrics

Implements: IEquatable<TextLineMetrics>

Methods

NameDescription
Equals (2 overloads)No summary available.
GetHashCodeNo summary available.
ToStringNo summary available.

Equals overloads

Equals Method

public bool Equals(Avalonia.Media.TextFormatting.TextLineMetrics other)
Parameters

other Avalonia.Media.TextFormatting.TextLineMetrics

Returns

bool

Equals Method

public bool Equals(object obj)
Parameters

obj object

Returns

bool

GetHashCode Method

public int GetHashCode()

Returns

int

ToString Method

public string ToString()

Returns

string

Properties

NameDescription
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.

Extent Property

Gets the distance from the top-most to bottom-most black pixel in a line.

public double Extent { get; set; }

HasOverflowed Property

Gets a value that indicates whether content of the line overflows the specified paragraph width.

public bool HasOverflowed { get; set; }

Height Property

Gets the height of a line of text.

public double Height { get; set; }

NewlineLength Property

Gets the number of newline characters at the end of a line.

public int NewlineLength { get; set; }

OverhangAfter Property

Gets the distance that black pixels extend beyond the bottom alignment edge of a line.

public double OverhangAfter { get; set; }

OverhangLeading Property

Gets the distance that black pixels extend prior to the left leading alignment edge of the line.

public double OverhangLeading { get; set; }

OverhangTrailing Property

Gets the distance that black pixels extend following the right trailing alignment edge of the line.

public double OverhangTrailing { get; set; }

Start Property

Gets the distance from the start of a paragraph to the starting point of a line.

public double Start { get; set; }

TextBaseline Property

Gets the distance from the top to the baseline of the line of text.

public double TextBaseline { get; set; }

TrailingWhitespaceLength Property

Gets the number of whitespace code points beyond the last non-blank character in a line.

public int TrailingWhitespaceLength { get; set; }

Width Property

Gets the width of a line of text, excluding trailing whitespace characters.

public double Width { get; set; }

WidthIncludingTrailingWhitespace Property

Gets the width of a line of text, including trailing whitespace characters.

public double WidthIncludingTrailingWhitespace { get; set; }