pub struct LayoutLine {
pub items: Vec<LineItem>,
pub width: f64,
pub ascent: f64,
pub descent: f64,
pub line_gap: f64,
pub height: f64,
pub indent_left: f64,
pub available_width: f64,
pub is_last: bool,
}Expand description
A laid-out line within a paragraph.
Fields§
§items: Vec<LineItem>§width: f64Total content width of the line.
ascent: f64Maximum ascent on this line (above baseline).
descent: f64Maximum descent on this line (below baseline).
line_gap: f64Effective leading needed to preserve the tallest run’s natural advance.
height: f64Total line height.
indent_left: f64Left indent for this line.
available_width: f64Available width this line was laid out against.
is_last: boolWhether this is the last line of the paragraph.
Implementations§
Source§impl LayoutLine
impl LayoutLine
Sourcepub fn baseline_offset(&self) -> f64
pub fn baseline_offset(&self) -> f64
Distance from the line-box top to its text baseline.
Trait Implementations§
Source§impl Clone for LayoutLine
impl Clone for LayoutLine
Source§fn clone(&self) -> LayoutLine
fn clone(&self) -> LayoutLine
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LayoutLine
impl RefUnwindSafe for LayoutLine
impl Send for LayoutLine
impl Sync for LayoutLine
impl Unpin for LayoutLine
impl UnsafeUnpin for LayoutLine
impl UnwindSafe for LayoutLine
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