Expand description
PDF blend modes (PDF spec §11.3.5).
All separable modes operate per-channel with src and dst in [0, 255] and
return a blended value in [0, 255]. For CMYK/DeviceN the caller inverts the
channel values before calling (255 - v) and inverts again after — the
subtractive complement trick used by the C++ splashOutBlend* functions.
Non-separable modes (Hue, Saturation, Color, Luminosity) operate on
full RGB triples (always in additive space); CMYK callers convert first.
Functions§
- apply_
nonseparable_ rgb - Apply a non-separable blend mode (
Hue/Saturation/Color/Luminosity) to an RGB triple. - apply_
separable - Apply a separable blend mode to each corresponding byte pair from
srcanddst. - blend_
color_ burn - Color burn: darken dst to reflect src.
- blend_
color_ dodge - Color dodge: brighten dst to reflect src.
- blend_
color_ rgb - Non-separable Color blend: hue and saturation of src, luminosity of dst.
- blend_
darken - Darken:
min(src, dst). - blend_
difference - Difference:
|src - dst|. - blend_
exclusion - Exclusion:
src + dst - 2 × div255(src × dst). - blend_
hard_ light - Hard light:
Overlay(dst, src)— the src/dst roles are swapped vs Overlay. - blend_
hue_ rgb - Non-separable Hue blend: hue of src, saturation and luminosity of dst.
- blend_
lighten - Lighten:
max(src, dst). - blend_
luminosity_ rgb - Non-separable Luminosity blend: luminosity of src, hue and saturation of dst.
- blend_
multiply - Multiply:
div255(src * dst). - blend_
normal - Normal: result is the source (Porter-Duff over handled in the pipe, not here).
- blend_
overlay - Overlay: hard-light of dst over src.
- blend_
saturation_ rgb - Non-separable Saturation blend: saturation of src, hue and luminosity of dst.
- blend_
screen - Screen:
src + dst - div255(src * dst). - blend_
soft_ light - Soft light (PDF spec §11.3.5.3).