pub struct LineMetrics {
pub range: Range<usize>,
pub baseline: f32,
pub ascent: f32,
pub descent: f32,
pub left: f32,
pub width: f32,
}Expand description
LineMetrics describes one laid-out line for caret and selection geometry.
Fields§
§range: Range<usize>range is the UTF-8 byte range covered by the line.
baseline: f32baseline is the paragraph-local y coordinate of the baseline.
ascent: f32ascent is the logical-pixel distance above the baseline.
descent: f32descent is the logical-pixel distance below the baseline.
left: f32left is the paragraph-local x coordinate after alignment.
width: f32width is the line’s signed content advance in logical pixels.
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 moreAuto 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