module Prawn::Graphics::BlendMode

The Prawn::BlendMode module is used to change the way two layers are blended together.

Passing an array of blend modes is allowed. PDF viewers should blend layers based on the first recognized blend mode.

Valid blend modes in v1.4 of the PDF spec include :Normal, :Multiply, :Screen, :Overlay, :Darken, :Lighten, :ColorDodge, :ColorBurn, :HardLight, :SoftLight, :Difference, :Exclusion, :Hue, :Saturation, :Color, and :Luminosity.

Example:

pdf.fill_color('0000ff')
pdf.fill_rectangle([x, y+25], 50, 50)
pdf.blend_mode(:Multiply) do
  pdf.fill_color('ff0000')
  pdf.fill_circle([x, y], 25)
end