pub enum BlendMode {
Show 16 variants
Normal,
Multiply,
Screen,
Overlay,
Darken,
Lighten,
ColorDodge,
ColorBurn,
HardLight,
SoftLight,
Difference,
Exclusion,
Hue,
Saturation,
Color,
Luminosity,
}Expand description
Artistic RGB operation applied before Porter-Duff source-over coverage.
The modes and their formulas are those of W3C Compositing and Blending
Level 1, evaluated in the renderer’s BlendSpace. The first twelve are
separable (each channel on its own); Hue, Saturation, Color, and
Luminosity are not.
Variants§
Normal
Preserve the source color.
Multiply
Multiply source and backdrop components.
Screen
Inverse-multiply source and backdrop components.
Overlay
Multiply dark backdrop regions and screen light regions.
Darken
The darker of source and backdrop, per channel.
Lighten
The lighter of source and backdrop, per channel.
ColorDodge
Brighten the backdrop to reflect the source.
ColorBurn
Darken the backdrop to reflect the source.
HardLight
Multiply or screen, depending on the source.
SoftLight
Darken or lighten, depending on the source: a diffused hard light.
Difference
The absolute difference of source and backdrop.
Exclusion
Like difference, with lower contrast.
Hue
The source’s hue with the backdrop’s saturation and luminosity.
Saturation
The source’s saturation with the backdrop’s hue and luminosity.
Color
The source’s hue and saturation with the backdrop’s luminosity.
Luminosity
The source’s luminosity with the backdrop’s hue and saturation.
Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.