Sha256: 07843baa98427e0176d76d64bdecc294c029167ae23d44a7935f7192c8df48d4
Contents?: true
Size: 492 Bytes
Versions: 8
Compression:
Stored size: 492 Bytes
Contents
# encoding: utf-8 require "#{File.dirname(__FILE__)}/../example_helper.rb" Prawn::Document.generate('simple_grid.pdf') do |p| p.define_grid(:columns => 5, :rows => 8, :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
Version data entries
8 entries across 8 versions & 3 rubygems