Class | Prawn::Document::Box
In: | lib/prawn/layout/grid.rb
Parent: | Object

A Box is a class that represents a bounded area of a page. A Grid object has methods that allow easy access to the coordinates of its corners, which can be plugged into most existing prawnmethods.

### Methods

bottom bottom_left bottom_right bounding_box gutter height left name new right show top top_left top_right total_height width

### Attributes

pdf | [R] |

### Public Class methods

new(pdf, i, j)

### Public Instance methods

bottom()

y-coordinate of the bottom

bottom_left()

x,y coordinates of bottom left corner

bottom_right()

x,y coordinates of bottom right corner

bounding_box(&blk)

Creates a standard bounding box based on the grid box.

gutter()

Width of the gutter

height()

Height of a box

left()

x-coordinate of left side

name()

Mostly diagnostic method that outputs the name of a box as col_num, row_num

right()

x-coordinate of right side

show(grid_color = "CCCCCC")

Diagnostic method

top()

y-coordinate of the top

top_left()

x,y coordinates of top left corner

top_right()

x,y coordinates of top right corner

total_height()

:nodoc

width()

Width of a box

[Validate]