pub struct BitmapData<'bitmap> {
pub width: c_int,
pub height: c_int,
pub row_bytes: c_int,
/* private fields */
}Expand description
The data is 1 bit per pixel packed format, in MSB order; in other words, the high bit of the first byte in data is the top left pixel of the image.
The mask data is in same format but means transparency.
Fields§
§width: c_int§height: c_int§row_bytes: c_intImplementations§
Source§impl<'bitmap> BitmapData<'bitmap>
impl<'bitmap> BitmapData<'bitmap>
pub const fn width(&self) -> c_int
pub const fn height(&self) -> c_int
pub const fn row_bytes(&self) -> c_int
pub fn mask(&self) -> Option<&[u8]>
pub fn mask_mut(&mut self) -> Option<&mut [u8]>
pub const fn data(&self) -> &[u8]
pub fn data_mut(&mut self) -> &mut [u8]
Trait Implementations§
Source§impl Debug for BitmapData<'_>
impl Debug for BitmapData<'_>
Auto Trait Implementations§
impl<'bitmap> Freeze for BitmapData<'bitmap>
impl<'bitmap> RefUnwindSafe for BitmapData<'bitmap>
impl<'bitmap> Send for BitmapData<'bitmap>
impl<'bitmap> Sync for BitmapData<'bitmap>
impl<'bitmap> Unpin for BitmapData<'bitmap>
impl<'bitmap> !UnwindSafe for BitmapData<'bitmap>
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
§impl<T> ToString for Twhere
T: Display + ?Sized,
impl<T> ToString for Twhere
T: Display + ?Sized,
§impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 28 bytes