prawn:Prawn::Document::Box.new
#!/usr/bin/env ruby require "prawn" require "prawn/layout" pdf = Prawn::Document.new pdf.define_grid(:columns => 3, :rows => 2, :gutter => 10) b = Prawn::Document::Box.new(pdf, 2, 3) p [b.top_left, b.top_right, b.bottom_left, b.bottom_right] b = Prawn::Document::Box.new(pdf, 1, 3) p [b.top_left, b.top_right, b.bottom_left, b.bottom_right] b = Prawn::Document::Box.new(pdf, 0, 3) p [b.top_left, b.top_right, b.bottom_left, b.bottom_right] b = Prawn::Document::Box.new(pdf, 2, 2) p [b.top_left, b.top_right, b.bottom_left, b.bottom_right]
で、
[[550.0, -10.0], [723.333333333333, -10.0], [550.0, -365.0], [723.333333333333, -365.0]] [[550.0, 355.0], [723.333333333333, 355.0], [550.0, 0.0], [723.333333333333, 0.0]] [[550.0, 720.0], [723.333333333333, 720.0], [550.0, 365.0], [723.333333333333, 365.0]] [[366.666666666667, -10.0], [540.0, -10.0], [366.666666666667, -365.0], [540.0, -365.0]]