Enum i_slint_core::graphics::SharedImageBuffer
source · #[repr(C)]pub enum SharedImageBuffer {
RGB8(SharedPixelBuffer<Rgb8Pixel>),
RGBA8(SharedPixelBuffer<Rgba8Pixel>),
RGBA8Premultiplied(SharedPixelBuffer<Rgba8Pixel>),
}
Expand description
SharedImageBuffer is a container for images that are stored in CPU accessible memory.
The SharedImageBuffer’s variants represent the different common formats for encoding images in pixels. TODO: Make this non_exhaustive before making the type public!
Variants§
RGB8(SharedPixelBuffer<Rgb8Pixel>)
This variant holds the data for an image where each pixel has three color channels (red, green, and blue) and each channel is encoded as unsigned byte.
RGBA8(SharedPixelBuffer<Rgba8Pixel>)
This variant holds the data for an image where each pixel has four color channels (red, green, blue and alpha) and each channel is encoded as unsigned byte.
RGBA8Premultiplied(SharedPixelBuffer<Rgba8Pixel>)
This variant holds the data for an image where each pixel has four color channels (red, green,
blue and alpha) and each channel is encoded as unsigned byte. In contrast to Self::RGBA8
,
this variant assumes that the alpha channel is also already multiplied to each red, green and blue
component of each pixel.
Only construct this format if you know that your pixels are encoded this way. It is more efficient
for rendering.
Implementations§
Trait Implementations§
source§fn clone(&self) -> SharedImageBuffer
fn clone(&self) -> SharedImageBuffer
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)