pub struct Line {
pub runs: Vec<PlacedRun>,
pub baseline: f32,
pub ascent: f32,
pub descent: f32,
pub left: f32,
pub width: f32,
pub range: Range<usize>,
}Expand description
Line contains the visually ordered runs and metrics of one laid-out line.
Fields§
§runs: Vec<PlacedRun>runs contains the line’s visually ordered glyph runs.
baseline: f32baseline is the paragraph-local y coordinate of the text baseline.
ascent: f32ascent is the maximum distance above the baseline in logical pixels.
descent: f32descent is the maximum distance below the baseline in logical pixels.
left: f32left is the paragraph-local x coordinate after alignment.
width: f32width is the signed content advance in logical pixels.
Trailing whitespace contributes only when requested by ParagraphStyle.
range: Range<usize>range is the UTF-8 byte range of paragraph text covered by the line.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnsafeUnpin for Line
impl UnwindSafe for Line
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more