pub struct GlyphBitmap {
pub width: u32,
pub height: u32,
pub left: i32,
pub top: i32,
pub data: Vec<u8>,
}Expand description
Your rendered glyph: pixels, position, and purpose
This isn’t just a bitmap—it’s a complete rendering package. We give you the pixels plus exact positioning information so you can place each glyph perfectly in your text layout.
Fields§
§width: u32How wide this glyph wants to be (in pixels)
height: u32How tall this glyph wants to be (in pixels)
left: i32How far from the origin to start drawing (left edge)
top: i32How far from the baseline to the top (for proper alignment)
data: Vec<u8>The actual alpha values: 0=invisible air, 255=solid ink
Trait Implementations§
Source§impl Clone for GlyphBitmap
impl Clone for GlyphBitmap
Source§fn clone(&self) -> GlyphBitmap
fn clone(&self) -> GlyphBitmap
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GlyphBitmap
impl RefUnwindSafe for GlyphBitmap
impl Send for GlyphBitmap
impl Sync for GlyphBitmap
impl Unpin for GlyphBitmap
impl UnsafeUnpin for GlyphBitmap
impl UnwindSafe for GlyphBitmap
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