#[non_exhaustive]pub enum Blend {
Show 25 variants
Clear,
Source,
Over,
In,
Out,
Atop,
Dest,
DestOver,
DestIn,
DestOut,
DestAtop,
Xor,
Add,
Saturate,
Multiply,
Screen,
Overlay,
Darken,
Lighten,
ColourDodge,
ColourBurn,
HardLight,
SoftLight,
Difference,
Exclusion,
}Expand description
How the overlay is combined with the base: sharp’s blend.
In the formulas, A is the overlay and B the base.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Clear
Nothing: the area under the overlay becomes transparent.
Source
The overlay replaces the base, alpha included.
Over
Porter-Duff source-over: the overlay is drawn on top of the base.
In
The overlay where the base is, transparent elsewhere.
Out
The overlay where the base is not.
Atop
The overlay over the base, kept to the base’s alpha.
Dest
The base alone: the overlay is ignored.
DestOver
The base over the overlay.
DestIn
The base where the overlay is.
DestOut
The base where the overlay is not: an overlay used as an eraser.
DestAtop
The base over the overlay, kept to the overlay’s alpha.
Xor
Each where the other is not.
Add
Colours and alphas summed.
Saturate
The overlay added only as far as the base has room for it.
Multiply
Colours multiplied: darkens.
Screen
Inverted colours multiplied: lightens.
Overlay
Multiply or screen, chosen by the base’s colour.
Darken
The darker of the two colours.
Lighten
The lighter of the two colours.
ColourDodge
The base brightened to reflect the overlay.
ColourBurn
The base darkened to reflect the overlay.
HardLight
Multiply or screen, chosen by the overlay’s colour.
SoftLight
A softer Blend::HardLight.
Difference
The absolute difference of the colours.
Exclusion
Blend::Difference with lower contrast.