#[non_exhaustive]#[repr(u8)]pub enum AlphaMode {
Undefined = 1,
Straight = 2,
Premultiplied = 3,
Opaque = 4,
}Expand description
Alpha channel interpretation.
Wrapped in Option<AlphaMode> on PixelDescriptor: None means no
alpha channel exists, while Some(AlphaMode::Straight) etc. describe
the semantics of a present alpha channel.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Undefined = 1
Alpha bytes exist but values are undefined padding (RGBX, BGRX).
Straight = 2
Straight (unassociated) alpha.
Premultiplied = 3
Premultiplied (associated) alpha.
Opaque = 4
Alpha channel present, all values fully opaque.
Implementations§
Trait Implementations§
impl Copy for AlphaMode
impl Eq for AlphaMode
impl StructuralPartialEq for AlphaMode
Auto Trait Implementations§
impl Freeze for AlphaMode
impl RefUnwindSafe for AlphaMode
impl Send for AlphaMode
impl Sync for AlphaMode
impl Unpin for AlphaMode
impl UnsafeUnpin for AlphaMode
impl UnwindSafe for AlphaMode
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