pub struct TextLine {
pub runs: Vec<TextRun>,
pub bounds: Rect,
pub metrics: LineMetrics,
pub ink_bounds: Rect,
}Expand description
A text line — holds all TextRuns within one line.
Coordinate system (relative to the layout origin):
bounds.origin: the line’s position in the layout.runs[].glyphs[].x/y: offsets relative tobounds.origin.
For absolute positioning: glyph coordinate = page offset + bounds.origin + glyph.
Fields§
§runs: Vec<TextRun>All runs in this line.
bounds: RectThe line’s bounding box (relative to the layout origin).
metrics: LineMetricsInline font metrics (ascent / descent / baseline / line_height).
ink_bounds: RectThe ink bounding box of the line’s actual glyphs (outline bbox, relative to the layout origin), used for precise vertical centering.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextLine
impl RefUnwindSafe for TextLine
impl Send for TextLine
impl Sync for TextLine
impl Unpin for TextLine
impl UnsafeUnpin for TextLine
impl UnwindSafe for TextLine
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