Enum webrender_api::ImageFormat
source · #[repr(u8)]pub enum ImageFormat {
R8 = 1,
R16 = 2,
BGRA8 = 3,
RGBAF32 = 4,
RG8 = 5,
RG16 = 6,
RGBAI32 = 7,
RGBA8 = 8,
}
Expand description
Specifies the format of a series of pixels, in driver terms.
Variants§
R8 = 1
One-channel, byte storage. The “red” doesn’t map to the color red per se, and is just the way that OpenGL has historically referred to single-channel buffers.
R16 = 2
One-channel, short storage
BGRA8 = 3
Four channels, byte storage.
RGBAF32 = 4
Four channels, float storage.
RG8 = 5
Two-channels, byte storage. Similar to R8
, this just means
“two channels” rather than “red and green”.
RG16 = 6
Two-channels, short storage. Similar to R16
, this just means
“two channels” rather than “red and green”.
RGBAI32 = 7
Four channels, signed integer storage.
RGBA8 = 8
Four channels, byte storage.
Implementations§
source§impl ImageFormat
impl ImageFormat
sourcepub fn bytes_per_pixel(self) -> i32
pub fn bytes_per_pixel(self) -> i32
Returns the number of bytes per pixel for the given format.
Trait Implementations§
source§impl Clone for ImageFormat
impl Clone for ImageFormat
source§fn clone(&self) -> ImageFormat
fn clone(&self) -> ImageFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ImageFormat
impl Debug for ImageFormat
source§impl<'de> Deserialize<'de> for ImageFormat
impl<'de> Deserialize<'de> for ImageFormat
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for ImageFormat
impl Hash for ImageFormat
source§impl PartialEq for ImageFormat
impl PartialEq for ImageFormat
source§fn eq(&self, other: &ImageFormat) -> bool
fn eq(&self, other: &ImageFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ImageFormat
impl Serialize for ImageFormat
impl Copy for ImageFormat
impl Eq for ImageFormat
impl StructuralPartialEq for ImageFormat
Auto Trait Implementations§
impl Freeze for ImageFormat
impl RefUnwindSafe for ImageFormat
impl Send for ImageFormat
impl Sync for ImageFormat
impl Unpin for ImageFormat
impl UnwindSafe for ImageFormat
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more