Sha256: 2582df2d71569680db61cffd7c4f066c73974116ec4be08251b60c9096d5aa80

Contents?: true

Size: 373 Bytes

Versions: 10

Compression:

Stored size: 373 Bytes

Contents

# encoding: utf-8

$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
require "prawn"

pdf = Prawn::Document.new

10.times do |i|
  pdf.stroke_polygon [ 50 + i*25,   50 + i*25], 
                     [100 + i*25,   50 + i*25],
                     [100 + i*25,  100 + i*25] 
  pdf.stroke_rectangle [0,600], 5*i, 10*i  
end

pdf.render_file "pretty_polygons.pdf"

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
fullcirclegroup-fullcirclegroup-prawn-0.2.99.2 examples/polygons.rb
fullcirclegroup-prawn-0.2.99.3 examples/polygons.rb
satoko-prawn-0.2.99.6 examples/polygons.rb
prawn-0.1.0 examples/polygons.rb
prawn-0.1.2 examples/polygons.rb
prawn-0.1.1 examples/polygons.rb
prawn-0.2.1 examples/polygons.rb
prawn-0.2.2 examples/polygons.rb
prawn-0.2.0 examples/polygons.rb
prawn-0.2.3 examples/polygons.rb