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
prawn-core-0.5.1 examples/graphics/polygons.rb