pub struct LineMetrics {
pub ascent: f32,
pub descent: f32,
pub leading: f32,
pub baseline_y: f32,
pub width: f32,
}Expand description
Vertical metrics for a single laid-out line, in pixels.
Fields§
§ascent: f32Distance from the line’s top to its baseline (positive).
descent: f32Distance from the baseline to the line’s bottom (positive).
leading: f32Extra leading distributed below the line.
baseline_y: f32Absolute Y coordinate of the baseline from the layout origin.
width: f32Total advance width of the line’s glyphs (before alignment), in pixels.
Implementations§
Trait Implementations§
Source§impl Clone for LineMetrics
impl Clone for LineMetrics
Source§fn clone(&self) -> LineMetrics
fn clone(&self) -> LineMetrics
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 moreSource§impl Debug for LineMetrics
impl Debug for LineMetrics
Source§impl PartialEq for LineMetrics
impl PartialEq for LineMetrics
Source§fn eq(&self, other: &LineMetrics) -> bool
fn eq(&self, other: &LineMetrics) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for LineMetrics
impl StructuralPartialEq for LineMetrics
Auto Trait Implementations§
impl Freeze for LineMetrics
impl RefUnwindSafe for LineMetrics
impl Send for LineMetrics
impl Sync for LineMetrics
impl Unpin for LineMetrics
impl UnsafeUnpin for LineMetrics
impl UnwindSafe for LineMetrics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more