pub enum BlendMode {
Show 16 variants
Over,
Multiply,
Screen,
Overlay,
Darken,
Lighten,
ColorDodge,
ColorBurn,
HardLight,
SoftLight,
Difference,
Exclusion,
Hue,
Saturation,
Color,
Luminosity,
}
Expand description
Raster blend mode. See https://www.w3.org/TR/compositing/#blending for more details.
Variants§
Over
Normal. Source is placed over the destination.
Multiply
The source color is multiplied by the destination color and replaces the destination.
Screen
Multiplies the complements of the backdrop and source color values, then complements the result.
Overlay
Multiplies or screens the colors, depending on the backdrop color value.
Darken
Selects the darker of the backdrop and source colors.
Lighten
Selects the lighter of the backdrop and source colors.
ColorDodge
Brightens the backdrop color to reflect the source color. Painting with black produces no changes.
ColorBurn
Darkens the backdrop color to reflect the source color. Painting with white produces no change.
HardLight
Multiplies or screens the colors, depending on the source color value. The effect is similar to shining a harsh spotlight on the backdrop.
SoftLight
Darkens or lightens the colors, depending on the source color value. The effect is similar to shining a diffused spotlight on the backdrop.
Difference
Subtracts the darker of the two constituent colors from the lighter color.
Exclusion
Produces an effect similar to that of the Difference
mode but lower in contrast.
Painting with white inverts the backdrop color; painting with black produces no change.
Hue
Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color.
Saturation
Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color. Painting with this mode in an area of the backdrop that is a pure gray (no saturation) produces no change.
Color
Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color. This preserves the gray levels of the backdrop and is useful for coloring monochrome images or tinting color images.
Luminosity
Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color.
This produces an inverse effect to that of the Color
mode.
Trait Implementations§
impl Copy 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)