pub enum BitmapFormat {
A8Unorm = 0,
Bgra8UnormSrgb = 1,
}Expand description
The supported bitmap formats.
Variants§
A8Unorm = 0
Alpha channel only, 8-bits per pixel.
Encoding: 8-bits per channel, unsigned normalized.
Color-space: Linear (no gamma), alpha-coverage only.
Bgra8UnormSrgb = 1
Blue Green Red Alpha channels, 32-bits per pixel.
Encoding: 8-bits per channel, unsigned normalized.
Color-space: sRGB gamma with premultiplied linear alpha channel.
Implementations§
Source§impl BitmapFormat
impl BitmapFormat
Sourcepub fn bytes_per_pixel(&self) -> u32
pub fn bytes_per_pixel(&self) -> u32
Returns the number of bytes per pixel for the specific bitmap format.
Trait Implementations§
Source§impl Clone for BitmapFormat
impl Clone for BitmapFormat
Source§fn clone(&self) -> BitmapFormat
fn clone(&self) -> BitmapFormat
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 BitmapFormat
impl Debug for BitmapFormat
Source§impl TryFrom<u32> for BitmapFormat
impl TryFrom<u32> for BitmapFormat
impl Copy for BitmapFormat
Auto Trait Implementations§
impl Freeze for BitmapFormat
impl RefUnwindSafe for BitmapFormat
impl Send for BitmapFormat
impl Sync for BitmapFormat
impl Unpin for BitmapFormat
impl UnwindSafe for BitmapFormat
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,
Source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere
T: Copy,
Source§unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
Prepares an output buffer, then turns this buffer into an
Owned.
User-provided closure F must only write to and not read from &mut Self.Source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Returns the size of each element.
Source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Produces a pointer to the data.
Source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
Source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.