LineMetrics class
LineMetrics stores the measurements and statistics of a single line in the paragraph.
The measurements here are for the line as a whole, and represent the maximum extent of the line instead of per-run or per-glyph metrics. For more detailed metrics, see TextBox and Paragraph.getBoxesForRange.
LineMetrics should be obtained directly from the Paragraph.computeLineMetrics method.
Constructors
Properties
- ascent → double
-
The rise from the baseline as calculated from the font and style for this line. [...]
final
- baseline → double
-
The y coordinate of the baseline for this line from the top of the paragraph. [...]
final
- descent → double
-
The drop from the baseline as calculated from the font and style for this line. [...]
final
- hardBreak → bool
-
True if this line ends with an explicit line break (e.g. '\n') or is the end
of the paragraph. False otherwise.
final
- hashCode → int
-
The hash code for this object. [...]
read-only, override
- height → double
-
Total height of the line from the top edge to the bottom edge. [...]
final
- left → double
-
The x coordinate of left edge of the line. [...]
final
- lineNumber → int
-
The number of this line in the overall paragraph, with the first line being
index zero. [...]
final
- unscaledAscent → double
-
The rise from the baseline as calculated from the font and style for this line
ignoring the
TextStyle.height
. [...]final - width → double
-
Width of the line from the left edge of the leftmost glyph to the right
edge of the rightmost glyph. [...]
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
toString(
) → String -
Returns a string representation of this object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
override