pub struct Canvas {
pub pixels: Vec<u8>,
pub size: Vector2I,
pub stride: usize,
pub format: Format,
}
Expand description
An in-memory bitmap surface for glyph rasterization.
Fields§
§pixels: Vec<u8>
The raw pixel data.
size: Vector2I
The size of the buffer, in pixels.
stride: usize
The number of bytes between successive rows.
format: Format
The image format of the canvas.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Canvas
impl RefUnwindSafe for Canvas
impl Send for Canvas
impl Sync for Canvas
impl Unpin for Canvas
impl UnwindSafe for Canvas
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