Enum rich_sdl2_rust::color::pixel::layout::PackedPixelLayout
source · #[non_exhaustive]pub enum PackedPixelLayout {
_332,
_4444,
_1555,
_5551,
_565,
_8888,
_2101010,
_1010102,
}
Expand description
A layout for a packed pixel format.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
_332
A layout is in 8 bits with 4 components, as below:
1112 2233
_4444
A layout is in 16 bits with 4 components with same size, as below:
0000 1111 2222 3333
_1555
A layout is in 16 bits with 4 components where only one component is 1 bit but others is 5 bits, as below:
01111 1222 2233 3333
_5551
A layout is in 16 bits with 4 components where only one component is 1 bit but others is 5 bits, as below:
0000 0111 1122 2223
_565
A layout is in 16 bits with 3 components where only one component is 6 bits but others is 5 bits, as below:
0000 0111 1112 2222
_8888
A layout is in 32 bits with 4 components with same size, as below:
0000 0000 1111 1111 2222 2222 3333 3333
_2101010
A layout is in 32 bits with 4 components where only one component is 2 bits but others is 10 bits, as below:
0011 1111 1111 2222 2222 2233 3333 3333
_1010102
A layout is in 32 bits with 4 components where only one component is 2 bits but others is 10 bits, as below:
0000 0000 0011 1111 1111 2222 2222 2233
Trait Implementations§
source§impl Clone for PackedPixelLayout
impl Clone for PackedPixelLayout
source§fn clone(&self) -> PackedPixelLayout
fn clone(&self) -> PackedPixelLayout
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PackedPixelLayout
impl Debug for PackedPixelLayout
source§impl From<u32> for PackedPixelLayout
impl From<u32> for PackedPixelLayout
source§impl Hash for PackedPixelLayout
impl Hash for PackedPixelLayout
source§impl PartialEq for PackedPixelLayout
impl PartialEq for PackedPixelLayout
source§fn eq(&self, other: &PackedPixelLayout) -> bool
fn eq(&self, other: &PackedPixelLayout) -> bool
self
and other
values to be equal, and is used
by ==
.