pub struct ColorBitmap<'a> {
pub width: u8,
pub height: u8,
pub bearing_x: i8,
pub bearing_y: i8,
pub advance: u8,
pub ppem: u8,
pub png_bytes: &'a [u8],
}Expand description
One glyph’s worth of data resolved out of CBDT, ready for PNG decode.
Fields§
§width: u8Width of the bitmap in pixels (from the per-glyph metrics).
height: u8Height in pixels.
bearing_x: i8Distance from the horizontal pen origin to the LEFT edge of the bitmap, in pixels.
bearing_y: i8Distance from the horizontal pen origin to the TOP edge of the bitmap, in pixels.
advance: u8Horizontal advance in pixels.
ppem: u8Strike pixels-per-em (the size at which this glyph was authored).
png_bytes: &'a [u8]Raw PNG byte stream — pass to oxideav_png::decode_png_to_frame
in the consumer crate. Borrowed from the parent CBDT slice.
Trait Implementations§
Source§impl<'a> Clone for ColorBitmap<'a>
impl<'a> Clone for ColorBitmap<'a>
Source§fn clone(&self) -> ColorBitmap<'a>
fn clone(&self) -> ColorBitmap<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for ColorBitmap<'a>
Auto Trait Implementations§
impl<'a> Freeze for ColorBitmap<'a>
impl<'a> RefUnwindSafe for ColorBitmap<'a>
impl<'a> Send for ColorBitmap<'a>
impl<'a> Sync for ColorBitmap<'a>
impl<'a> Unpin for ColorBitmap<'a>
impl<'a> UnsafeUnpin for ColorBitmap<'a>
impl<'a> UnwindSafe for ColorBitmap<'a>
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