Sha256: 75bdb2680664c321a05eb793340ee4b4e8522f249fa10c86dbf04fa5fe27ebd6

Contents?: true

Size: 410 Bytes

Versions: 21

Compression:

Stored size: 410 Bytes

Contents

# encoding: utf-8
# 
# Basic polygon drawing example.  See also: hexagon.rb
#
require "#{File.dirname(__FILE__)}/../example_helper.rb"

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

21 entries across 21 versions & 7 rubygems

Version Path
piglop-prawn-0.10.2.3 examples/graphics/polygons.rb
piglop-prawn-0.10.2.2 examples/graphics/polygons.rb
piglop-prawn-0.10.2.1 examples/graphics/polygons.rb
prawn-0.11.1.pre examples/graphics/polygons.rb
goodwill-prawn-edge-0.10.0 examples/graphics/polygons.rb
alphasights-prawn-0.10.4 examples/graphics/polygons.rb
alphasights-prawn-0.10.3 examples/graphics/polygons.rb
alphasights-prawn-0.10.2 examples/graphics/polygons.rb
alphasights-prawn-0.10.1 examples/graphics/polygons.rb
alphasights-prawn-0.10.0 examples/graphics/polygons.rb
prawn-core-0.8.4 examples/graphics/polygons.rb
prawn-graph-0.0.2 vendor/prawn-core/examples/graphics/polygons.rb
prawn-graph-0.0.1 vendor/prawn-core/examples/graphics/polygons.rb
prawn-core-0.7.2 examples/graphics/polygons.rb
prawn-core-0.7.1 examples/graphics/polygons.rb
prawn-layout-0.3.2 vendor/prawn-core/examples/graphics/polygons.rb
prawn-core-0.6.3 examples/graphics/polygons.rb
prawn-core-0.6.2 examples/graphics/polygons.rb
prawn-layout-0.3.1 vendor/prawn-core/examples/graphics/polygons.rb
prawn-core-0.6.1 examples/graphics/polygons.rb