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.

fn byte_size_of_pixels(&self, num_of_pixels: usize) -> usize

fn byte_size_per_pixel(&self) -> usize

Trait Implementations

impl FromPrimitive for PixelFormatEnum

fn from_i64(n: i64) -> Option<PixelFormatEnum>

fn from_u64(n: u64) -> Option<PixelFormatEnum>

fn from_isize(n: isize) -> Option<Self>

fn from_i8(n: i8) -> Option<Self>

fn from_i16(n: i16) -> Option<Self>

fn from_i32(n: i32) -> Option<Self>

fn from_usize(n: usize) -> Option<Self>

fn from_u8(n: u8) -> Option<Self>

fn from_u16(n: u16) -> Option<Self>

fn from_u32(n: u32) -> Option<Self>

fn from_f32(n: f32) -> Option<Self>

fn from_f64(n: f64) -> Option<Self>

Derived Implementations

impl Debug for PixelFormatEnum

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Hash for PixelFormatEnum

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl PartialEq for PixelFormatEnum

fn eq(&self, __arg_0: &PixelFormatEnum) -> bool

fn ne(&self, __arg_0: &PixelFormatEnum) -> bool

impl Eq for PixelFormatEnum

impl Clone for PixelFormatEnum

fn clone(&self) -> PixelFormatEnum

fn clone_from(&mut self, source: &Self)

impl Copy for PixelFormatEnum