public
Description: Fast, Nimble PDF Writer for Ruby
Homepage: http://prawn.majesticseacreature.com
Clone URL: git://github.com/sandal/prawn.git
Added missing offset possibility for :vposition, and argument description
Trym Skaar (author)
Fri Oct 31 05:53:56 -0700 2008
commit  566de576dbf32915ed07647f982c9e0f10ef494c
tree    d4e0f38305c4a4731deb40245e634de1b386ade1
parent  2b698eb419eba3a9929437d2881c66adf78b2a69
...
20
21
22
 
23
24
25
...
129
130
131
 
 
132
133
134
...
20
21
22
23
24
25
26
...
130
131
132
133
134
135
136
137
0
@@ -20,6 +20,7 @@ module Prawn
0
     # Options:
0
     # <tt>:at</tt>:: the location of the top left corner of the image.
0
     # <tt>:position</tt>::  One of (:left, :center, :right) or an x-offset
0
+    # <tt>:vposition</tt>::  One of (:top, :center, :center) or an y-offset    
0
     # <tt>:height</tt>:: the height of the image [actual height of the image]
0
     # <tt>:width</tt>:: the width of the image [actual width of the image]
0
     # <tt>:scale</tt>:: scale the dimensions of the image proportionally
0
@@ -129,6 +130,8 @@ module Prawn
0
         bounds.absolute_top - (bounds.height - h) / 2.0
0
       when :bottom
0
         bounds.absolute_bottom + h
0
+      when Numeric
0
+        bounds.absolute_top - options[:vposition]
0
       end
0
       return [x,y]
0
     end

Comments