prawnpdf/prawn — pull request #406 by cheba (2012-09-30 09:26:44+00:00)
Title: Soft masks

Soft masks are used for arbitrary transparency. It's like alpha channel in PNG.

The Prawn::SoftMask module is used to create arbitrary transparency in document. Using a soft mask allows creaing more visually rich documents.

You must group soft mask and graphics it's applied to under `save_graphics_state` because soft mask is a part of graphic state in PDF.

Example:
```ruby
pdf.save_graphics_state do
pdf.soft_mask do
pdf.fill_color "444444"
pdf.fill_polygon [0, 40], [60, 10], [120, 40], [60, 68]
end
pdf.fill_color '000000'
pdf.fill_rectangle [0, 10], 120, 68
end
```