module Prawn::Graphics::Transparency

The Prawn::Transparency module is used to place transparent content on the page. It has the capacity for separate transparency values for stroked content and all other content.

Example:

# both the fill and stroke will be at 50% opacity
pdf.transparent(0.5) do
  pdf.text("hello world")
  pdf.fill_and_stroke_circle_at([x, y], :radius => 25)
end

# the fill will be at 50% opacity, but the stroke will
# be at 75% opacity
pdf.transparent(0.5, 0.75) do
  pdf.text("hello world")
  pdf.fill_and_stroke_circle_at([x, y], :radius => 25)
end