Sha256: f2e928dbe10c4794cc3068ac823a56ff886464bf9b244ef78e902d107f0de185
Contents?: true
Size: 490 Bytes
Versions: 7
Compression:
Stored size: 490 Bytes
Contents
# encoding: utf-8 require "#{File.dirname(__FILE__)}/../example_helper.rb" 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
7 entries across 7 versions & 3 rubygems