Struct speedy2d::font::FormattedTextLine
source · [−]pub struct FormattedTextLine { /* private fields */ }Expand description
Represents a line of text which has been laid out as part of a block.
Implementations
sourceimpl FormattedTextLine
impl FormattedTextLine
sourcepub fn iter_glyphs(&self) -> Iter<'_, FormattedGlyph>
pub fn iter_glyphs(&self) -> Iter<'_, FormattedGlyph>
Iterate over the glyphs in this line.
sourcepub fn height(&self) -> f32
pub fn height(&self) -> f32
The height (in pixels) of this text line. This is equal to the
ascent() minus the descent().
sourcepub fn ascent(&self) -> f32
pub fn ascent(&self) -> f32
The ascent (in pixels) of this text line. This is the maximum height of each glyph above the text baseline.
sourcepub fn descent(&self) -> f32
pub fn descent(&self) -> f32
The descent (in pixels) of this text line. This is the furthest distance of each glyph below the text baseline.
This is negative: a value of -10.0 means the font can descend 10
pixels below the baseline.
sourcepub fn line_gap(&self) -> f32
pub fn line_gap(&self) -> f32
The recommended gap to put between each line of text, as encoded by the font authors.
sourcepub fn baseline_position(&self) -> f32
pub fn baseline_position(&self) -> f32
The vertical position of this line’s baseline within the block of text.
Auto Trait Implementations
impl RefUnwindSafe for FormattedTextLine
impl Send for FormattedTextLine
impl Sync for FormattedTextLine
impl Unpin for FormattedTextLine
impl UnwindSafe for FormattedTextLine
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more