[][src]Enum sdl2::pixels::PixelFormatEnum

#[repr(i32)]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[src]

pub const RGBA32: PixelFormatEnum[src]

pub const ARGB32: PixelFormatEnum[src]

pub const BGRA32: PixelFormatEnum[src]

pub const ABGR32: PixelFormatEnum[src]

impl PixelFormatEnum[src]

pub fn from_masks(masks: PixelMasks) -> PixelFormatEnum[src]

pub fn into_masks(self) -> Result<PixelMasks, String>[src]

pub fn byte_size_from_pitch_and_height(
    self,
    pitch: usize,
    height: usize
) -> usize
[src]

Calculates the total byte size of an image buffer, given its pitch and height.

pub fn byte_size_of_pixels(self, num_of_pixels: usize) -> usize[src]

pub fn byte_size_per_pixel(self) -> usize[src]

pub fn supports_alpha(self) -> bool[src]

Trait Implementations

impl Clone for PixelFormatEnum[src]

impl Copy for PixelFormatEnum[src]

impl Debug for PixelFormatEnum[src]

impl Eq for PixelFormatEnum[src]

impl From<PixelFormat> for PixelFormatEnum[src]

impl Hash for PixelFormatEnum[src]

impl PartialEq<PixelFormatEnum> for PixelFormatEnum[src]

impl StructuralEq for PixelFormatEnum[src]

impl StructuralPartialEq for PixelFormatEnum[src]

impl TryFrom<PixelFormatEnum> for PixelFormat[src]

type Error = String

The type returned in the event of a conversion error.

impl TryFrom<u32> for PixelFormatEnum[src]

type Error = ()

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for PixelFormatEnum

impl Send for PixelFormatEnum

impl Sync for PixelFormatEnum

impl Unpin for PixelFormatEnum

impl UnwindSafe for PixelFormatEnum

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.