pub struct PrintImage {
pub width: u32,
pub height: u32,
pub density: f32,
pub pixels: Vec<u8>,
}Fields§
§width: u32§height: u32§density: f32§pixels: Vec<u8>Implementations§
Source§impl PrintImage
impl PrintImage
pub fn new(width: f32, height: f32, density: f32) -> Result<Self, Error>
pub fn from_texels(width: u32, height: u32, density: f32) -> Result<Self, Error>
pub fn pixel(&self, x: u32, y: u32) -> [u8; 4]
pub fn fill( &mut self, rect: [f32; 4], color: [f32; 4], clip: [f32; 4], turn: [f32; 3], )
pub fn icon(&mut self, icon: &Icon<'_>) -> Result<(), Error>
Trait Implementations§
Source§impl Clone for PrintImage
impl Clone for PrintImage
Source§fn clone(&self) -> PrintImage
fn clone(&self) -> PrintImage
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 moreSource§impl Debug for PrintImage
impl Debug for PrintImage
Source§impl PartialEq for PrintImage
impl PartialEq for PrintImage
Source§fn eq(&self, other: &PrintImage) -> bool
fn eq(&self, other: &PrintImage) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PrintImage
Auto Trait Implementations§
impl Freeze for PrintImage
impl RefUnwindSafe for PrintImage
impl Send for PrintImage
impl Sync for PrintImage
impl Unpin for PrintImage
impl UnsafeUnpin for PrintImage
impl UnwindSafe for PrintImage
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