Struct TextLineMetrics
- Namespace
- Avalonia.Media.TextFormatting
- Assembly
- Avalonia.Base.dll
Represents a metric for a TextLine objects, that holds information about ascent, descent, line gap, size and origin of the text line.
public readonly struct TextLineMetrics : IEquatable<TextLineMetrics>
- Implements
- Inherited Members
Properties
Extent
Gets the distance from the top-most to bottom-most black pixel in a line.
public double Extent { get; init; }
Property Value
HasOverflowed
Gets a value that indicates whether content of the line overflows the specified paragraph width.
public bool HasOverflowed { get; init; }
Property Value
Height
Gets the height of a line of text.
public double Height { get; init; }
Property Value
NewlineLength
Gets the number of newline characters at the end of a line.
public int NewlineLength { get; init; }
Property Value
OverhangAfter
Gets the distance that black pixels extend beyond the bottom alignment edge of a line.
public double OverhangAfter { get; init; }
Property Value
OverhangLeading
Gets the distance that black pixels extend prior to the left leading alignment edge of the line.
public double OverhangLeading { get; init; }
Property Value
OverhangTrailing
Gets the distance that black pixels extend following the right trailing alignment edge of the line.
public double OverhangTrailing { get; init; }
Property Value
Start
Gets the distance from the start of a paragraph to the starting point of a line.
public double Start { get; init; }
Property Value
TextBaseline
Gets the distance from the top to the baseline of the line of text.
public double TextBaseline { get; init; }
Property Value
TrailingWhitespaceLength
Gets the number of whitespace code points beyond the last non-blank character in a line.
public int TrailingWhitespaceLength { get; init; }
Property Value
Width
Gets the width of a line of text, excluding trailing whitespace characters.
public double Width { get; init; }
Property Value
WidthIncludingTrailingWhitespace
Gets the width of a line of text, including trailing whitespace characters.
public double WidthIncludingTrailingWhitespace { get; init; }
Property Value
Methods
Equals(TextLineMetrics)
public bool Equals(TextLineMetrics other)
Parameters
other
TextLineMetrics
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(TextLineMetrics, TextLineMetrics)
public static bool operator ==(TextLineMetrics left, TextLineMetrics right)
Parameters
left
TextLineMetricsright
TextLineMetrics
Returns
operator !=(TextLineMetrics, TextLineMetrics)
public static bool operator !=(TextLineMetrics left, TextLineMetrics right)
Parameters
left
TextLineMetricsright
TextLineMetrics