Struct gfx_glyph::GlyphInfo
[−]
[src]
pub struct GlyphInfo<'a> { pub text: &'a str, pub screen_position: (f32, f32), pub bounds: (f32, f32), pub scale: Scale, // some fields omitted }
A specialised view on a Section
for the purposes of calculating
glyph positions. Used by a GlyphPositioner
.
See Layout
for built-in positioner logic.
Fields
text: &'a str
Section text, use remaining_chars()
instead in order
to respect skip settings, ie in leftover payloads.
screen_position: (f32, f32)
Position on screen to render text, in pixels from top-left.
bounds: (f32, f32)
Max (width, height) bounds, in pixels from top-left.
scale: Scale
Font scale
Methods
impl<'a> GlyphInfo<'a>
[src]
fn remaining_chars(&self) -> Skip<Recompositions<Chars<'a>>>
[src]
Returns a unicode normalized char iterator, that respects the skipped chars that have already been already processed
fn skip(&self, skip: usize) -> GlyphInfo<'a>
[src]
Returns a new GlyphInfo instance whose
remaining_chars()
method will skip additional chars.
fn substring(&self) -> &'a str
[src]
Returns a substring reference according the current skip value
Trait Implementations
impl<'a> Debug for GlyphInfo<'a>
[src]
impl<'a> Clone for GlyphInfo<'a>
[src]
fn clone(&self) -> GlyphInfo<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more