[−][src]Enum sdl2::pixels::PixelFormatEnum
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
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][−]
self,
pitch: usize,
height: usize
) -> usize
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][+]
impl TryFrom<u32> for PixelFormatEnum
[src][+]
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][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,