public
Description: Fast, Nimble PDF Writer for Ruby
Homepage: http://prawn.majesticseacreature.com
Clone URL: git://github.com/sandal/prawn.git
minor cleanup
sandal (author)
Mon Jul 21 12:39:08 -0700 2008
commit  fbf50793597f1ebaed9b77395e9cacfc86b78bed
tree    ffb96e57bd7caf55d76d50c9a776ce108f9ad141
parent  45c73d64b62039ebc6ee60779c9410dc8aeaf7b0
...
123
124
125
126
127
128
 
 
 
129
130
131
 
132
133
 
 
134
135
136
...
123
124
125
 
 
 
126
127
128
129
130
 
131
132
 
133
134
135
136
137
0
@@ -123,14 +123,15 @@ module Prawn
0
       def draw
0
         case(@position) 
0
         when :center
0
-          x = ((@document.bounds.width) / 2.0 ) - (width / 2.0)
0
-
0
-          @document.bounding_box [x,@document.y - @document.bounds.absolute_bottom], :width => width do
0
+          x = (@document.bounds.width - width) / 2.0
0
+          y = @document.y - @document.bounds.absolute_bottom
0
+          @document.bounding_box [x, y], :width => width do
0
             generate_table
0
           end
0
-        when Numeric
0
+        when Numeric     
0
           x = @position
0
-          @document.bounding_box [x,@document.y - @document.bounds.absolute_bottom], :width => width do
0
+          y = @document.y - @document.bounds.absolute_bottom
0
+          @document.bounding_box [x,y], :width => width do
0
             generate_table
0
           end
0
         else

Comments