Skip to main content

LockedBitmap

Struct LockedBitmap 

Source
pub struct LockedBitmap {
    pub lock_info: BitmapLockInfo,
    /* private fields */
}
Expand description

Locked version of bitmap so that the data can be accessed

Fields§

§lock_info: BitmapLockInfo

Implementations§

Source§

impl LockedBitmap

Source

pub fn unlock(self) -> Result<Bitmap, Error>

Unlock the bitmap object. Once the bitmap is unlocked, the pixel data must not be accessed anymore.

\param bitmap_object The bitmap object.

\returns An error-code indicating success or failure of the operation.

Source

pub fn copy( &self, width: u32, height: u32, pixel_type: PixelType, stride: u32, ) -> Result<Bitmap, Error>

Copy the pixel data from the specified bitmap object to the specified memory buffer. The specified destination bitmap must have same width, height and pixel type as the source bitmap.

\param bitmap_object The bitmap object. \param width The width of the destination bitmap. \param height The height of the destination bitmap. \param pixel_type The pixel type. \param stride The stride (given in bytes). \param [out] ptr Pointer to the memory location where the bitmap is to be copied to.

\returns A LibCZIApiErrorCode.

Methods from Deref<Target = Bitmap>§

Source

pub fn get_info(&self) -> Result<BitmapInfo, Error>

Get information about the specified bitmap object.

\param bitmap_object The bitmap object. \param [out] bitmap_info If successful, information about the bitmap object is put here.

\returns An error-code indicating success or failure of the operation.

Source

pub fn release(&self) -> Result<(), Error>

Release the specified bitmap object. It is a fatal error trying to release a bitmap object that is still locked.

\param bitmap_object The bitmap object.

\returns An error-code indicating success or failure of the operation.

Trait Implementations§

Source§

impl Deref for LockedBitmap

Source§

type Target = Bitmap

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Drop for LockedBitmap

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.