[−][src]Enum beryllium::PixelFormatEnum
The various named pixel formats that SDL2 supports.
There's various checks you can perform on each pixel format.
Note that the "fourcc" formats, anything that gives true
from the
is_fourcc method, are industry specified special
values, and do not follow SDL2's bit packing scheme. In other words, the
output they produce for any of the other check methods is not to really be
trusted.
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
Planar mode: Y + V + U (3 planes)
IYUV
Planar mode: Y + U + V (3 planes)
YUY2
Packed mode: Y0+U0+Y1+V0 (1 plane)
UYVY
Packed mode: U0+Y0+V0+Y1 (1 plane)
YVYU
Packed mode: Y0+V0+Y1+U0 (1 plane)
NV12
Planar mode: Y + U/V interleaved (2 planes)
NV21
Planar mode: Y + V/U interleaved (2 planes)
ExternalOES
Android video texture format
Methods
impl PixelFormatEnum
[src]
pub const RGBA32: Self
[src]
Platform specific alias for RGBA
pub const ARGB32: Self
[src]
Platform specific alias for ARGB
pub const BGRA32: Self
[src]
Platform specific alias for BGRA
pub const ABGR32: Self
[src]
Platform specific alias for ABGR
impl PixelFormatEnum
[src]
pub fn pixel_type(self) -> PixelType
[src]
The type of the pixel format.
All unknown types convert to PixelType::Unknown
, of course.
pub fn pixel_order(self) -> PixelOrder
[src]
Ordering of channel or bits in the pixel format.
Unknown values convert to one of the None
variants.
pub fn pixel_layout(self) -> PixelLayout
[src]
Channel bits pattern of the pixel format.
Converts any possible unknown layout to PixelLayout::None
.
pub fn bits_per_pixel(self) -> u32
[src]
Bits of color information per pixel.
pub fn bytes_per_pixel(self) -> u32
[src]
Bytes used per pixel.
Note: Formats with less than 8 bits per pixel give a result of 0 bytes per pixel. Weird and all, but that's how it is.
pub fn is_indexed(self) -> bool
[src]
Is this format an indexed format?
pub fn is_packed(self) -> bool
[src]
Is this format a packed format?
pub fn is_array(self) -> bool
[src]
Is this format a packed format?
pub fn is_alpha(self) -> bool
[src]
Is this format a format with an alpha channel?
pub fn is_fourcc(self) -> bool
[src]
Is this a four-character code format?
True for pixel formats representing unique formats, for example YUV formats.
Trait Implementations
impl Eq for PixelFormatEnum
[src]
impl Clone for PixelFormatEnum
[src]
fn clone(&self) -> PixelFormatEnum
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<PixelFormatEnum> for PixelFormatEnum
[src]
fn eq(&self, other: &PixelFormatEnum) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Copy for PixelFormatEnum
[src]
impl From<i32> for PixelFormatEnum
[src]
impl Debug for PixelFormatEnum
[src]
Auto Trait Implementations
impl Send for PixelFormatEnum
impl Sync for PixelFormatEnum
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,