pub struct ImageData { /* private fields */ }Expand description
Validated, row-major RGBA8 image pixels.
Image resources accept pixels directly; this type does not decode paths or
encoded image formats. Each resource is limited to
MAX_IMAGE_RESOURCE_BYTES.
Implementations§
Source§impl ImageData
impl ImageData
Sourcepub fn from_rgba(width: u32, height: u32, pixels: Vec<u8>) -> GuiResult<Self>
pub fn from_rgba(width: u32, height: u32, pixels: Vec<u8>) -> GuiResult<Self>
Creates an RGBA8 image after checking dimensions, byte arithmetic, resource bounds, and the exact buffer length.
Trait Implementations§
impl Eq for ImageData
impl StructuralPartialEq for ImageData
Auto Trait Implementations§
impl Forget for ImageData
impl Freeze for ImageData
impl Move for ImageData
impl RefUnwindSafe for ImageData
impl Send for ImageDatawhere
RawVecInner: Send,
impl Sync for ImageDatawhere
RawVecInner: Sync,
impl Unpin for ImageData
impl UnsafeUnpin for ImageData
impl UnwindSafe for ImageDatawhere
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