pub struct Bitmap { /* private fields */ }Expand description
An owned row-major, one-bit-per-pixel bitmap.
Within each byte, the leftmost pixel is stored in the most significant bit.
Implementations§
Source§impl Bitmap
impl Bitmap
Sourcepub fn blank(
width: u32,
height: u32,
limits: &Limits,
) -> Result<Self, DecodeError>
pub fn blank( width: u32, height: u32, limits: &Limits, ) -> Result<Self, DecodeError>
Allocates a zero-filled bitmap under the supplied resource limits.
§Errors
Returns DecodeError::LimitExceeded if the dimensions or allocation
exceed limits, DecodeError::Malformed if size arithmetic cannot be
represented, or DecodeError::Allocation if storage cannot be
reserved.
Trait Implementations§
impl Eq for Bitmap
impl StructuralPartialEq for Bitmap
Auto Trait Implementations§
impl Forget for Bitmap
impl Freeze for Bitmap
impl Move for Bitmap
impl RefUnwindSafe for Bitmap
impl Send for Bitmapwhere
RawVecInner: Send,
impl Sync for Bitmapwhere
RawVecInner: Sync,
impl Unpin for Bitmap
impl UnsafeUnpin for Bitmap
impl UnwindSafe for Bitmapwhere
RawVecInner: UnwindSafe,
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