pub enum ColorForm {
Premultiplied,
Straight,
}Expand description
What space a color filter’s matrix expects its input in.
A dart:ui color matrix is defined on straight color, which is the form a
person writes a saturation or a sepia matrix in. A blend against a constant
color is defined on premultiplied color, which is the form the compositing
rules are stated in. Both are affine, both are one matrix here, and this is
which one – because the shader works in premultiplied color and has to know
whether to undo that before applying the matrix.
Variants§
Premultiplied
Premultiplied, which is what the shader already has.
Straight
Straight, which the shader divides out first and restores after.
Trait Implementations§
impl Copy for ColorForm
impl Eq for ColorForm
impl StructuralPartialEq for ColorForm
Auto Trait Implementations§
impl Freeze for ColorForm
impl RefUnwindSafe for ColorForm
impl Send for ColorForm
impl Sync for ColorForm
impl Unpin for ColorForm
impl UnsafeUnpin for ColorForm
impl UnwindSafe for ColorForm
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