pub struct Bitmap { /* private fields */ }
Expand description
Bitmaps have 1 bit per component. Only used for creating halftoned versions of contone buffers, and saving out. Samples are stored msb first, akin to pbms.
Implementations§
source§impl Bitmap
impl Bitmap
pub fn from_pixmap(pixmap: &Pixmap) -> Result<Self, Error>
pub fn stride(&self) -> i32
pub fn n(&self) -> i32
sourcepub fn resolution(&self) -> (i32, i32)
pub fn resolution(&self) -> (i32, i32)
Horizontal and vertical resolution in dpi (dots per inch).
pub fn samples(&self) -> &[u8] ⓘ
pub fn samples_mut(&mut self) -> &mut [u8] ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bitmap
impl RefUnwindSafe for Bitmap
impl !Send for Bitmap
impl !Sync for Bitmap
impl Unpin for Bitmap
impl UnwindSafe for Bitmap
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