#[repr(u32)]pub enum BlendMode {
Show 18 variants
Normal = 0,
Multiply = 1,
Screen = 2,
Overlay = 3,
SoftLight = 4,
HardLight = 5,
ColorDodge = 6,
ColorBurn = 7,
Difference = 8,
Exclusion = 9,
Add = 10,
Subtract = 11,
Darken = 12,
Lighten = 13,
Hue = 14,
Saturation = 15,
Color = 16,
Luminosity = 17,
}Expand description
Photoshop-compatible blend modes.
Variants§
Normal = 0
Overlay replaces base.
Multiply = 1
base × overlay.
Screen = 2
1 − (1−base)(1−overlay).
Overlay = 3
Multiply below 50% grey, Screen above.
SoftLight = 4
Soft light — W3C formula.
HardLight = 5
Hard light — Overlay with base/overlay swapped.
ColorDodge = 6
base / (1 − overlay).
ColorBurn = 7
1 − (1−base) / overlay.
Difference = 8
|base − overlay|.
Exclusion = 9
base + overlay − 2·base·overlay.
Add = 10
clamp(base + overlay, 0, 1).
Subtract = 11
clamp(base − overlay, 0, 1).
Darken = 12
min(base, overlay).
Lighten = 13
max(base, overlay).
Hue = 14
Overlay hue + base saturation + base lightness.
Saturation = 15
Base hue + overlay saturation + base lightness.
Color = 16
Overlay hue + overlay saturation + base lightness.
Luminosity = 17
Base hue + base saturation + overlay lightness.
Trait Implementations§
impl Copy for BlendMode
impl Eq for BlendMode
impl StructuralPartialEq for BlendMode
Auto Trait Implementations§
impl Freeze for BlendMode
impl RefUnwindSafe for BlendMode
impl Send for BlendMode
impl Sync for BlendMode
impl Unpin for BlendMode
impl UnsafeUnpin for BlendMode
impl UnwindSafe for BlendMode
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