pub struct AtlasSlot {
pub image_id: ImageId,
pub page_index: u32,
pub x: u16,
pub y: u16,
pub width: u16,
pub height: u16,
pub bearing_x: i16,
pub bearing_y: i16,
}Expand description
Location and metrics of a cached glyph within an atlas page.
One slot is stored per distinct (font, glyph ID, size, subpixel offset)
combination in GlyphAtlas.
Fields§
§image_id: ImageIdThe image ID for this glyph in the ImageCache.
Used for deallocation and for looking up the atlas page/offset.
page_index: u32Which atlas page contains this glyph.
x: u16X position in atlas (pixels).
y: u16Y position in atlas (pixels).
width: u16Width of glyph bitmap (pixels).
height: u16Height of glyph bitmap (pixels).
bearing_x: i16Horizontal bearing (offset from glyph origin to left edge of bitmap).
bearing_y: i16Vertical bearing (offset from glyph origin to top edge of bitmap).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AtlasSlot
impl RefUnwindSafe for AtlasSlot
impl Send for AtlasSlot
impl Sync for AtlasSlot
impl Unpin for AtlasSlot
impl UnsafeUnpin for AtlasSlot
impl UnwindSafe for AtlasSlot
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