Sha256: 009c1990afcd148585568d3835cdd3b868c7ddd1a157a2b6f1aad8c9314777e0

Contents?: true

Size: 472 Bytes

Versions: 2

Compression:

Stored size: 472 Bytes

Contents

# encoding: utf-8
# 
# Basic polygon drawing example.  See also: hexagon.rb
#
require File.expand_path(File.join(File.dirname(__FILE__),
                                   %w[.. example_helper]))

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

2 entries across 2 versions & 2 rubygems

Version Path
prawn-0.11.1 examples/graphics/polygons.rb
davebenvenuti-prawn-0.11.1.pre examples/graphics/polygons.rb