#20 new
JackC

Bounding box should not modify parameters

Reported by JackC | August 27th, 2009 @ 02:49 PM

Just spent about an hour tracking down why my bounding boxes kept sliding over.

require 'rubygems'
require 'prawn'

Prawn::Document.generate("test.pdf") do |pdf|

  pos = [ 300, 300 ]
  
  3.times do
    pdf.bounding_box pos, :width => 100, :height => 100 do
    end
    
    puts pos.inspect
  end
end

This results in:

[336, 336.0]
[372, 372.0]
[408, 408.0]

pos shouldn't be modified by the bounding_box call.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Pages