[][src]Enum webrender_api::ImageFormat

#[repr(u32)]
pub enum ImageFormat { R8, R16, BGRA8, RGBAF32, RG8, RGBAI32, RGBA8, }

Specifies the format of a series of pixels, in driver terms.

Variants

R8

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

One-channel, short storage

BGRA8

Four channels, byte storage.

RGBAF32

Four channels, float storage.

RG8

Two-channels, byte storage. Similar to R8, this just means "two channels" rather than "red and green".

RGBAI32

Four channels, signed integer storage.

RGBA8

Four channels, byte storage.

Methods

impl ImageFormat[src]

pub fn bytes_per_pixel(self) -> i32[src]

Returns the number of bytes per pixel for the given format.

Trait Implementations

impl Clone for ImageFormat[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for ImageFormat[src]

impl Copy for ImageFormat[src]

impl PartialEq<ImageFormat> for ImageFormat[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Debug for ImageFormat[src]

impl Hash for ImageFormat[src]

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

Feeds a slice of this type into the given [Hasher]. Read more

impl Serialize for ImageFormat[src]

impl<'de> Deserialize<'de> for ImageFormat[src]

Auto Trait Implementations

impl Send for ImageFormat

impl Sync for ImageFormat

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]