public
Description: Fast, Nimble PDF Writer for Ruby
Homepage: http://prawn.majesticseacreature.com
Clone URL: git://github.com/sandal/prawn.git
Added an absolute bounding box shortcut [#31 state:resolved]
sandal (author)
Wed Jun 25 11:47:59 -0700 2008
commit  d96c2d5d87cf5c0f3d590be21251ab6689ba2229
tree    84e762df218bd4c360ca1b2a829f0aba8d628621
parent  dce12d8675c91a2e3fd6c3eed7e6e88394ce17da
...
1
2
3
4
5
6
...
1
2
 
3
4
5
0
@@ -1,6 +1,5 @@
0
 $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
0
 require "prawn"
0
-require "prawn/graphics/cell"
0
 
0
 # If this looks a somewhat Byzantine, don't worry.  It's a temporary interface
0
 # to low level objects I'll be using for table building support (and other fun
...
68
69
70
 
 
 
 
 
71
72
73
...
68
69
70
71
72
73
74
75
76
77
78
0
@@ -68,6 +68,11 @@ module Prawn
0
       self.y = @bounding_box.absolute_bottom
0
       @bounding_box = parent_box
0
     end
0
+
0
+    def canvas(&block)
0
+      bounding_box( [0, page_dimensions[3]], 
0
+       :width  => page_dimensions[2], :height => page_dimensions[3], &block)
0
+    end
0
     
0
     class BoundingBox
0
       

Comments