0
@@ -69,6 +69,13 @@ module Prawn
0
@bounding_box = parent_box
0
+ # A shortcut to produce a bounding box which is mapped to the document's
0
+ # absolute coordinates
0
+ # pdf.line pdf.bounds.bottom_left, pdf.bounds.top_right
0
bounding_box( [0, page_dimensions[3]],
0
:width => page_dimensions[2], :height => page_dimensions[3], &block)
0
@@ -84,91 +91,109 @@ module Prawn
0
# The translated origin (x,y-height) which describes the location
0
# of the bottom left corner of the bounding box in absolute terms.
0
# Relative left x-coordinate of the bounding box. (Always 0)
0
# Relative right x-coordinate of the bounding box. (Equal to the box width)
0
# Relative top y-coordinate of the bounding box. (Equal to the box height)
0
# Relative bottom y-coordinate of the bounding box (Always 0)
0
# Relative top-left point of the bounding_box
0
# Relative top-right point of the bounding box
0
# Relative bottom-right point of the bounding box
0
# Relative bottom-left point of the bounding box
0
# Absolute left x-coordinate of the bounding box
0
# Absolute right x-coordinate of the bounding box
0
# Absolute top y-coordinate of the bounding box
0
# Absolute bottom y-coordinate of the bottom box
0
# Absolute top-left point of the bounding box
0
[absolute_left, absolute_top]
0
# Absolute top-right point of the bounding box
0
[absolute_right, absolute_top]
0
# Absolute bottom-left point of the bounding box
0
def absolute_bottom_left
0
[absolute_left, absolute_bottom]
0
# Absolute bottom-left point of the bounding box
0
def absolute_bottom_right
0
[absolute_right, absolute_bottom]
0
# Width of the bounding box
0
@@ -176,6 +201,7 @@ module Prawn
0
# Height of the bounding box. If the box is 'stretchy' (unspecified
0
# height attribute), height is calculated as the distance from the top of
0
# the box to the current drawing position.
0
absolute_top - @parent.y