pub struct LineMetric {
pub start_index: usize,
pub end_index: usize,
pub baseline: LayoutUnit,
pub height: LayoutUnit,
pub width: LayoutUnit,
}Expand description
Per-line metrics from the same shaped paragraph used for paint and hit testing.
Fields§
§start_index: usizeByte index where this line starts in the source string.
end_index: usizeByte index where this line ends in the source string (exclusive).
baseline: LayoutUnitDistance from the top of the paragraph to the alphabetic baseline.
height: LayoutUnitTotal line height, including leading.
width: LayoutUnitShaped width of the line.
Trait Implementations§
Source§impl Clone for LineMetric
impl Clone for LineMetric
Source§fn clone(&self) -> LineMetric
fn clone(&self) -> LineMetric
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 LineMetric
impl Debug for LineMetric
Source§impl<'de> Deserialize<'de> for LineMetric
impl<'de> Deserialize<'de> for LineMetric
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LineMetric
impl PartialEq for LineMetric
Source§impl Serialize for LineMetric
impl Serialize for LineMetric
impl StructuralPartialEq for LineMetric
Auto Trait Implementations§
impl Freeze for LineMetric
impl RefUnwindSafe for LineMetric
impl Send for LineMetric
impl Sync for LineMetric
impl Unpin for LineMetric
impl UnsafeUnpin for LineMetric
impl UnwindSafe for LineMetric
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