pub struct GlyphImage {
pub width: u32,
pub height: u32,
pub left: i32,
pub top: i32,
pub data: Vec<u8>,
}Expand description
GlyphImage contains rasterized glyph pixels and baseline-relative placement.
Alpha and SDF images store one byte per pixel. Color images store
premultiplied RGBA8. To place the bitmap at glyph origin (x, y), draw its
top-left at (x + left, y - top).
Fields§
§width: u32width is the bitmap width in pixels.
height: u32height is the bitmap height in pixels.
left: i32left is the bitmap’s horizontal offset from the glyph origin.
top: i32top is the bitmap’s upward offset from the baseline.
data: Vec<u8>data contains tightly packed rows in the format produced by the raster method.
Auto Trait Implementations§
impl Freeze for GlyphImage
impl RefUnwindSafe for GlyphImage
impl Send for GlyphImage
impl Sync for GlyphImage
impl Unpin for GlyphImage
impl UnsafeUnpin for GlyphImage
impl UnwindSafe for GlyphImage
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