pub struct PixelFormat {
pub num_channels: u32,
pub endianness: Endianness,
pub align: usize,
}Expand description
Desired Pixel Format
Fields§
§num_channels: u32Amount of channels available in a pixel buffer.
- single-channel data, e.g. grayscale or a single extra channel
- single-channel + alpha
- trichromatic, e.g. RGB
- trichromatic + alpha
§Default
0, which means determined automatically from color channels and alpha bits
endianness: EndiannessWhether multibyte data types are represented in big endian or little
endian format. This applies to u16, f16, and f32.
§Default
align: usizeAlign scanlines to a multiple of align bytes.
§Default
0, which means requiring no alignment (which has the same effect as value 1)
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
Returns a duplicate 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 PixelFormat
impl Debug for PixelFormat
Source§impl Default for PixelFormat
impl Default for PixelFormat
impl Copy for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnwindSafe for PixelFormat
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