[][src]Struct piet::LineMetric

pub struct LineMetric {
    pub start_offset: usize,
    pub end_offset: usize,
    pub trailing_whitespace: usize,
    pub baseline: f64,
    pub height: f64,
    pub cumulative_height: f64,
}

Metadata about each line in a text layout.

Fields

start_offset: usize

Index (in code units) of the start of the line, offset from the beginning of the text.

end_offset: usize

Line length (in UTF-8 code units), but offset from the beginning of the text. So it's the length of this line summed with the lengths of all the lines before it.

Includes trailing whitespace.

trailing_whitespace: usize

Length in (in UTF-8 code units) of current line's trailing whitespace.

baseline: f64

Distance of the baseline from the top of the line

height: f64

Line height

cumulative_height: f64

Cumulative line height (includes previous line heights)

Trait Implementations

impl Clone for LineMetric[src]

impl Debug for LineMetric[src]

impl Default for LineMetric[src]

impl PartialEq<LineMetric> for LineMetric[src]

impl StructuralPartialEq for LineMetric[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.