pub struct RichLine {
pub words: Vec<StyledWord>,
pub height: f32,
pub ascent_pt: f32,
}Expand description
One wrapped line of a Text::rich(..) paragraph. height is
size * line_height of the line’s tallest word (not a fixed,
whole-paragraph value like plain Text’s line_height_pt);
ascent_pt is that same tallest word’s ascent, in points — every word
on the line shares this one baseline reference regardless of its own
size, which is what keeps mixed sizes visually aligned on one baseline
instead of each hanging from its own.
Fields§
§words: Vec<StyledWord>§height: f32§ascent_pt: f32Trait Implementations§
Auto Trait Implementations§
impl Freeze for RichLine
impl RefUnwindSafe for RichLine
impl Send for RichLine
impl Sync for RichLine
impl Unpin for RichLine
impl UnsafeUnpin for RichLine
impl UnwindSafe for RichLine
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