pub struct TextPixels {
pub width: u32,
pub height: u32,
pub pixels: Vec<u8>,
}Expand description
Straight-alpha RGBA8 pixels, row by row, that a text was rasterized into: what an image of it holds, without the content hash a bitmap computes over every pixel.
Fields§
§width: u32Width in pixels.
height: u32Height in pixels.
pixels: Vec<u8>Four bytes a pixel, width pixels a row.
Implementations§
Source§impl TextPixels
impl TextPixels
Sourcepub fn into_image(self) -> Option<ImageBitmap>
pub fn into_image(self) -> Option<ImageBitmap>
The pixels as a bitmap, hashed for caches keyed by content.
Auto Trait Implementations§
impl Freeze for TextPixels
impl RefUnwindSafe for TextPixels
impl Send for TextPixels
impl Sync for TextPixels
impl Unpin for TextPixels
impl UnsafeUnpin for TextPixels
impl UnwindSafe for TextPixels
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