pub struct CachedGlyph {
pub atlas_rect: [f32; 4],
pub size: [f32; 2],
pub offset: [f32; 2],
}Expand description
A glyph ready to draw from the atlas.
Fields§
§atlas_rect: [f32; 4][x0, y0, x1, y1] of the glyph’s coverage in atlas texels (not normalized: stays
valid when the atlas grows).
size: [f32; 2]Bitmap size in pixels; [0, 0] for glyphs without ink.
offset: [f32; 2]Offset from the pen position (x) and baseline (y, negative = up) to the bitmap’s top-left corner, in pixels.
Trait Implementations§
Source§impl Clone for CachedGlyph
impl Clone for CachedGlyph
impl Copy for CachedGlyph
Source§impl Debug for CachedGlyph
impl Debug for CachedGlyph
Source§impl PartialEq for CachedGlyph
impl PartialEq for CachedGlyph
impl StructuralPartialEq for CachedGlyph
Auto Trait Implementations§
impl Freeze for CachedGlyph
impl RefUnwindSafe for CachedGlyph
impl Send for CachedGlyph
impl Sync for CachedGlyph
impl Unpin for CachedGlyph
impl UnsafeUnpin for CachedGlyph
impl UnwindSafe for CachedGlyph
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