Skip to content

Commit

Permalink
Added column_gutter_grid example
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Byron authored and Jordan Byron committed Jul 26, 2009
1 parent 4a4376a commit 967639c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/grid/column_gutter_grid.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# encoding: utf-8

require "#{File.dirname(__FILE__)}/../example_helper.rb"

Prawn::Document.generate('column_gutter_grid.pdf') do |p|
p.define_grid(:columns => 3, :rows => 10, :column_gutter => 10)

p.grid.rows.times do |i|
p.grid.columns.times do |j|
b = p.grid(i,j)
p.bounding_box b.top_left, :width => b.width, :height => b.height do
p.text b.name
p.stroke do
p.rectangle(p.bounds.top_left, b.width, b.height)
end
end
end
end
end

0 comments on commit 967639c

Please sign in to comment.