pub struct LineMetrics {
pub hard_break: bool,
pub ascent: f64,
pub descent: f64,
pub unscaled_ascent: f64,
pub height: f64,
pub width: f64,
pub left: f64,
pub baseline: f64,
pub line_number: i32,
}Expand description
LineMetrics stores the measurements and statistics of a single line in the paragraph.
Fields§
§hard_break: boolTrue if this line ends with an explicit line break (e.g. \n) or is the end of the
paragraph. False otherwise.
ascent: f64The rise from the baseline as calculated from the font and style
for this line.
descent: f64The drop from the baseline as calculated from the font and style
for this line.
unscaled_ascent: f64The rise from the baseline as calculated from the font and style
for this line ignoring the TextStyle.height.
height: f64Total height of the line from the top edge to the bottom edge.
width: f64Width of the line from the left edge of the leftmost glyph to the right edge of the rightmost glyph.
left: f64The x coordinate of left edge of the line.
baseline: f64The y coordinate of the baseline for this line from the top of the paragraph.
line_number: i32The number of this line in the overall paragraph, with the first line being index zero.
Trait Implementations§
Source§impl Clone for LineMetrics
impl Clone for LineMetrics
Source§fn clone(&self) -> LineMetrics
fn clone(&self) -> LineMetrics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more