pub enum ColorMatrixAlphaMode {
Premultiplied,
Straight,
}Expand description
How a ColorMatrix treats the premultiplied colours it is applied to
(Win2D CanvasAlphaMode of ColorMatrixEffect.AlphaMode, Direct2D’s
D2D1_COLORMATRIX_ALPHA_MODE).
Variants§
Premultiplied
The colour is un-premultiplied, the matrix applied to [R, G, B, a, 1]
and the result premultiplied again (the Win2D default).
Straight
The matrix is applied to the premultiplied colour as it is,
[R a, G a, B a, a, 1], and the result taken as premultiplied (its
colour clamped to its alpha).
Trait Implementations§
Source§impl Clone for ColorMatrixAlphaMode
impl Clone for ColorMatrixAlphaMode
impl Copy for ColorMatrixAlphaMode
Source§impl Debug for ColorMatrixAlphaMode
impl Debug for ColorMatrixAlphaMode
Source§impl Default for ColorMatrixAlphaMode
impl Default for ColorMatrixAlphaMode
impl Eq for ColorMatrixAlphaMode
Source§impl Hash for ColorMatrixAlphaMode
impl Hash for ColorMatrixAlphaMode
Source§impl PartialEq for ColorMatrixAlphaMode
impl PartialEq for ColorMatrixAlphaMode
impl StructuralPartialEq for ColorMatrixAlphaMode
Auto Trait Implementations§
impl Freeze for ColorMatrixAlphaMode
impl RefUnwindSafe for ColorMatrixAlphaMode
impl Send for ColorMatrixAlphaMode
impl Sync for ColorMatrixAlphaMode
impl Unpin for ColorMatrixAlphaMode
impl UnsafeUnpin for ColorMatrixAlphaMode
impl UnwindSafe for ColorMatrixAlphaMode
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more