Sha256: dc86f50835e45556128f661b695f3e50fba00730b3bd72c1304bba98f057f71b
Contents?: true
Size: 551 Bytes
Versions: 2
Compression:
Stored size: 551 Bytes
Contents
# encoding: utf-8 require File.expand_path(File.join(File.dirname(__FILE__), %w[.. example_helper])) Prawn::Document.generate('bounding_box_grid.pdf') do |p| p.define_grid(:columns => 5, :rows => 8, :gutter => 10) p.stroke_color = "ff0000" p.grid.rows.times do |i| p.grid.columns.times do |j| p.grid(i,j).bounding_box do p.text p.grid(i,j).name p.stroke do p.rectangle(p.bounds.top_left, p.bounds.width, p.bounds.height) end end end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
prawn-0.11.1 | examples/grid/bounding_boxes.rb |
davebenvenuti-prawn-0.11.1.pre | examples/grid/bounding_boxes.rb |