Absolute bottom y-coordinate of the bottom box
Absolute bottom-left point of the bounding box
Absolute left x-coordinate of the bounding box
Absolute right x-coordinate of the bounding box
Absolute top y-coordinate of the bounding box
Absolute top-left point of the bounding box
Absolute top-right point of the bounding box
The translated origin (x,y-height) which describes the location of the bottom left corner of the bounding box
Relative bottom y-coordinate of the bounding box (Always 0)
Example, position some text 3 pts from the bottom of the containing box:
text('hello', :at => [0, (bounds.bottom + 3)])
Relative bottom-left point of the bounding box
Example, draw a line along the left hand side of the page:
stroke do line(bounds.bottom_left, bounds.top_left) end
Relative bottom-right point of the bounding box
Example, draw a line along the right hand side of the page:
stroke do line(bounds.bottom_right, bounds.top_right) end
Height of the bounding box. If the box is ‘stretchy’ (unspecified height attribute), height is calculated as the distance from the top of the box to the current drawing position.
Relative left x-coordinate of the bounding box. (Always 0)
Example, position some text 3 pts from the left of the containing box:
text('hello', :at => [(bounds.left + 3), 0])
Relative right x-coordinate of the bounding box. (Equal to the box width)
Example, position some text 3 pts from the right of the containing box:
text('hello', :at => [(bounds.right - 3), 0])
Returns false when the box has a defined height, true when the height is being calculated on the fly based on the current vertical position.
Relative top y-coordinate of the bounding box. (Equal to the box height)
Example, position some text 3 pts from the top of the containing box:
text('hello', :at => [0, (bounds.top - 3)])
Relative top-left point of the bounding_box
Example, draw a line from the top left of the box diagonally to the bottom right:
stroke do line(bounds., bounds.bottom_right) end
Relative top-right point of the bounding box
Example, draw a line from the top_right of the box diagonally to the bottom left:
stroke do line(bounds.top_right, bounds.bottom_left) end
Width of the bounding box
[Validate]