pub struct ImageBitmap { /* private fields */ }Expand description
Immutable RGBA image data used by UI primitives and render backends.
Implementations§
Source§impl ImageBitmap
impl ImageBitmap
Sourcepub fn from_rgba8(
width: u32,
height: u32,
pixels: Vec<u8>,
) -> Result<Self, ImageBitmapError>
pub fn from_rgba8( width: u32, height: u32, pixels: Vec<u8>, ) -> Result<Self, ImageBitmapError>
Creates a bitmap from tightly packed RGBA8 pixels.
Sourcepub fn from_rgba8_slice(
width: u32,
height: u32,
pixels: &[u8],
) -> Result<Self, ImageBitmapError>
pub fn from_rgba8_slice( width: u32, height: u32, pixels: &[u8], ) -> Result<Self, ImageBitmapError>
Creates a bitmap from tightly packed RGBA8 pixels.
Sourcepub fn intrinsic_size(&self) -> Size
pub fn intrinsic_size(&self) -> Size
Returns intrinsic size in logical units.
Trait Implementations§
Source§impl Clone for ImageBitmap
impl Clone for ImageBitmap
Source§fn clone(&self) -> ImageBitmap
fn clone(&self) -> ImageBitmap
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 ImageBitmap
impl Debug for ImageBitmap
Source§impl Hash for ImageBitmap
impl Hash for ImageBitmap
Source§impl PartialEq for ImageBitmap
impl PartialEq for ImageBitmap
impl Eq for ImageBitmap
Auto Trait Implementations§
impl Freeze for ImageBitmap
impl RefUnwindSafe for ImageBitmap
impl Send for ImageBitmap
impl Sync for ImageBitmap
impl Unpin for ImageBitmap
impl UnwindSafe for ImageBitmap
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