Enum sdl2::pixels::PixelFormatEnum
[−]
[src]
pub enum PixelFormatEnum { Unknown, Index1LSB, Index1MSB, Index4LSB, Index4MSB, Index8, RGB332, RGB444, RGB555, BGR555, ARGB4444, RGBA4444, ABGR4444, BGRA4444, ARGB1555, RGBA5551, ABGR1555, BGRA5551, RGB565, BGR565, RGB24, BGR24, RGB888, RGBX8888, BGR888, BGRX8888, ARGB8888, RGBA8888, ABGR8888, BGRA8888, ARGB2101010, YV12, IYUV, YUY2, UYVY, YVYU, }
Variants
Unknown | |
Index1LSB | |
Index1MSB | |
Index4LSB | |
Index4MSB | |
Index8 | |
RGB332 | |
RGB444 | |
RGB555 | |
BGR555 | |
ARGB4444 | |
RGBA4444 | |
ABGR4444 | |
BGRA4444 | |
ARGB1555 | |
RGBA5551 | |
ABGR1555 | |
BGRA5551 | |
RGB565 | |
BGR565 | |
RGB24 | |
BGR24 | |
RGB888 | |
RGBX8888 | |
BGR888 | |
BGRX8888 | |
ARGB8888 | |
RGBA8888 | |
ABGR8888 | |
BGRA8888 | |
ARGB2101010 | |
YV12 | |
IYUV | |
YUY2 | |
UYVY | |
YVYU |
Methods
impl PixelFormatEnum
fn from_masks(masks: PixelMasks) -> PixelFormatEnum
fn into_masks(self) -> SdlResult<PixelMasks>
fn byte_size_from_pitch_and_height(&self, pitch: usize, height: usize) -> usize
Calculates the total byte size of an image buffer, given its pitch and height.