Sha256: c5c9d32a39cd49f6f7a0d8696458d9f6d6c7aaeff0b5d7fc0715c8ca5e2fea6b
Contents?: true
Size: 699 Bytes
Versions: 1
Compression:
Stored size: 699 Bytes
Contents
# encoding: utf-8 # # Demonstrate use of transparency # require File.expand_path(File.join(File.dirname(__FILE__), %w[.. example_helper])) Prawn::Document.generate("transparency.pdf") do fill_color("ff0000") fill_circle_at([200, 200], :radius => 200) transparent(0.5, 1) do fill_color("000000") stroke_color("ffffff") fill_and_stroke_circle_at([300, 300], :radius => 200) fill_color("ffffff") text "transparency " * 150, :size => 18 end start_new_page fill_color("000000") fill_rectangle([0, bounds.top], 200, 100) transparent(0.5) do fill_color("ff0000") fill_rectangle([100, bounds.top - 50], 200, 100) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
davebenvenuti-prawn-0.11.1.pre | examples/graphics/transparency.rb |