pub struct Glyph { /* private fields */ }Expand description
A glyph of a Font: the frame of its font’s sprite that holds its
pixels, where it goes from the pen, and how far it moves the pen.
Implementations§
Source§impl Glyph
impl Glyph
Sourcepub fn frame(&self) -> Option<usize>
pub fn frame(&self) -> Option<usize>
Its frame, an index into its font’s sprite’s
AtlasSprite::frames: None for a glyph with no pixels, such as
a space.
Sourcepub fn offset(&self) -> IVec2
pub fn offset(&self) -> IVec2
Where its rectangle’s top-left corner is from the pen, which is on
the line’s top: BMFont’s xoffset and yoffset. Its frame is that
rectangle trimmed: AtlasFrame::offset
places its pixels in it.
Trait Implementations§
impl Copy for Glyph
impl Eq for Glyph
impl StructuralPartialEq for Glyph
Auto Trait Implementations§
impl Forget for Glyph
impl Freeze for Glyph
impl Move for Glyph
impl RefUnwindSafe for Glyph
impl Send for Glyph
impl Sync for Glyph
impl Unpin for Glyph
impl UnsafeUnpin for Glyph
impl UnwindSafe for Glyph
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