pub enum BlendMode {
Show 16 variants
Normal,
Multiply,
Screen,
Overlay,
Darken,
Lighten,
ColorDodge,
ColorBurn,
HardLight,
SoftLight,
Difference,
Exclusion,
Hue,
Saturation,
Color,
Luminosity,
}Expand description
PDF compositing blend mode (PDF 32000-1:2008, §11.3.5).
Blend mode is a typed enum; dispatch happens in pipe::blend.
§Separable vs. non-separable
The first twelve variants (Normal through Exclusion) are separable:
the blend function operates independently on each colour channel.
The last four (Hue through Luminosity) are non-separable: they operate
on the full RGB triple (with CMYK converted to additive space first).
Normal is by far the most common; the pipeline fast-paths for it.
Variants§
Normal
Standard Porter-Duff over (gfxBlendNormal).
Multiply
Cs × Cd (gfxBlendMultiply).
Screen
Cs + Cd - Cs × Cd (gfxBlendScreen).
Overlay
Hard-light of Cd over Cs (gfxBlendOverlay).
Darken
min(Cs, Cd) (gfxBlendDarken).
Lighten
max(Cs, Cd) (gfxBlendLighten).
ColorDodge
Brighten Cd to reflect Cs (gfxBlendColorDodge).
ColorBurn
Darken Cd to reflect Cs (gfxBlendColorBurn).
HardLight
Multiply or screen depending on Cs < 0.5 (gfxBlendHardLight).
SoftLight
Soft version of HardLight (gfxBlendSoftLight).
Difference
|Cd - Cs| (gfxBlendDifference).
Exclusion
Cs + Cd - 2 × Cs × Cd (gfxBlendExclusion).
Hue
Hue of Cs, saturation and luminosity of Cd (non-separable, gfxBlendHue).
Saturation
Saturation of Cs, hue and luminosity of Cd (non-separable, gfxBlendSaturation).
Color
Hue and saturation of Cs, luminosity of Cd (non-separable, gfxBlendColor).
Luminosity
Luminosity of Cs, hue and saturation of Cd (non-separable, gfxBlendLuminosity).