#[repr(C)]pub struct BitmapData {
pub width: i32,
pub height: i32,
pub width_bytes: i32,
pub planes: u16,
pub pixel_bits: u16,
pub bits: *mut u8,
/* private fields */
}Available on Windows only.
Expand description
The BitmapData structure defines the width,
height, colour format, and bit values of a bitmap.
Fields§
§width: i32The width, in pixels, of the bitmap. The width must be greater than zero.
height: i32The height, in pixels, of the bitmap. The height must be greater than zero.
width_bytes: i32The number of bytes in each scan line. This value must be divisible by 2, because the system assumes that the bit values of a bitmap form an array that is word aligned.
planes: u16The count of colour planes.
pixel_bits: u16The number of bits required to indicate the colour of a pixel.
bits: *mut u8A pointer to the location of the bit values for the bitmap.
The bits member must be a pointer to an array of character (1-byte) values.
Implementations§
Source§impl BitmapData
impl BitmapData
pub const fn new() -> BitmapData
pub const fn size(self, size: [i32; 2]) -> BitmapData
pub const fn width_bytes(self, width: i32) -> BitmapData
pub const fn planes(self, planes: u16) -> BitmapData
pub const fn pixel_bits(self, bits: u16) -> BitmapData
pub const fn bits(self, bits: *mut u8) -> BitmapData
Trait Implementations§
Source§impl Clone for BitmapData
impl Clone for BitmapData
Source§fn clone(&self) -> BitmapData
fn clone(&self) -> BitmapData
Returns a duplicate of the value. Read more
1.0.0 · 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 BitmapData
impl Debug for BitmapData
impl Copy for BitmapData
Auto Trait Implementations§
impl Freeze for BitmapData
impl RefUnwindSafe for BitmapData
impl !Send for BitmapData
impl !Sync for BitmapData
impl Unpin for BitmapData
impl UnwindSafe for BitmapData
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