pub enum PixelOrder {
Rgba8,
Bgra8,
}Expand description
The channel order the four bytes of a pixel arrive in, for a consumer reading frames off a pipe or a buffer (ADR-0187).
A closed set of two, because a frame this engine hands out is 8 bits per channel in one of the two orders a swapchain negotiates. sRGB and linear variants of a format are the same order — the transfer function is what a consumer’s own colour handling deals with and the byte layout is what it has to be told.
Variants§
Rgba8
Red, green, blue, alpha — what a headless run always produces, and what
an ImageData on a canvas means by its bytes.
Bgra8
Blue, green, red, alpha — what a swapchain commonly negotiates on Windows, and the order a consumer assuming the other one paints with red and blue swapped.
Implementations§
Source§impl PixelOrder
impl PixelOrder
Trait Implementations§
Source§impl Clone for PixelOrder
impl Clone for PixelOrder
Source§fn clone(&self) -> PixelOrder
fn clone(&self) -> PixelOrder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PixelOrder
impl Debug for PixelOrder
Source§impl PartialEq for PixelOrder
impl PartialEq for PixelOrder
Source§fn eq(&self, other: &PixelOrder) -> bool
fn eq(&self, other: &PixelOrder) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for PixelOrder
impl Eq for PixelOrder
impl StructuralPartialEq for PixelOrder
Auto Trait Implementations§
impl Freeze for PixelOrder
impl RefUnwindSafe for PixelOrder
impl Send for PixelOrder
impl Sync for PixelOrder
impl Unpin for PixelOrder
impl UnsafeUnpin for PixelOrder
impl UnwindSafe for PixelOrder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.