LineMetrics

class LineMetrics(val startIndex: Int, val endIndex: Int, val endExcludingWhitespaces: Int, val endIncludingNewline: Int, val isHardBreak: Boolean, val ascent: Double, val descent: Double, val unscaledAscent: Double, val height: Double, val width: Double, val left: Double, val baseline: Double, val lineNumber: Int)

Constructors

Link copied to clipboard
constructor(startIndex: Int, endIndex: Int, endExcludingWhitespaces: Int, endIncludingNewline: Int, isHardBreak: Boolean, ascent: Double, descent: Double, unscaledAscent: Double, height: Double, width: Double, left: Double, baseline: Double, lineNumber: Int)

Properties

Link copied to clipboard

The final computed ascent for the line. This can be impacted by the strut, height, scaling, as well as outlying runs that are very tall. The top edge is getBaseline() - getAscent() and the bottom edge is getBaseline() + getDescent(). Ascent and descent are provided as positive numbers. These values are the cumulative metrics for the entire line.

Link copied to clipboard

The y position of the baseline for this line from the top of the paragraph.

Link copied to clipboard

The final computed descent for the line. This can be impacted by the strut, height, scaling, as well as outlying runs that are very tall. The top edge is getBaseline() - getAscent() and the bottom edge is getBaseline() + getDescent(). Ascent and descent are provided as positive numbers. These values are the cumulative metrics for the entire line.

Link copied to clipboard

The index in the text buffer the line ends.

Link copied to clipboard

The index in the text buffer the line begins.

Link copied to clipboard

The index in the text buffer the line ends.

Link copied to clipboard

Total height of the paragraph including the current line.

Link copied to clipboard
Link copied to clipboard

The left edge of the line.

Link copied to clipboard

The height of the current line, equals to Math.round(getAscent() + getDescent()).

Link copied to clipboard

Zero indexed line number

Link copied to clipboard

The right edge of the line, equals to getLeft() + getWidth()

Link copied to clipboard

The index in the text buffer the line begins.

Link copied to clipboard

The final computed descent for the line. This can be impacted by the strut, height, scaling, as well as outlying runs that are very tall. The top edge is getBaseline() - getAscent() and the bottom edge is getBaseline() + getDescent(). Ascent and descent are provided as positive numbers. These values are the cumulative metrics for the entire line.

Link copied to clipboard

Width of the line.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String