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.
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
sourceimpl Clone for SharedImageBuffer
impl Clone for SharedImageBuffer
sourcefn clone(&self) -> SharedImageBuffer
fn clone(&self) -> SharedImageBuffer
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SharedImageBuffer
impl Debug for SharedImageBuffer
Auto Trait Implementations
impl RefUnwindSafe for SharedImageBuffer
impl Send for SharedImageBuffer
impl !Sync for SharedImageBuffer
impl Unpin for SharedImageBuffer
impl UnwindSafe for SharedImageBuffer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more