class Hpdf::Table
- Hpdf::Table
- Reference
- Object
Overview
The table is the container for Row, which contain Cell.
Defined in:
hpdf/table.crConstructors
-
.new(x : Number, y : Number, width : Number, height : Number)
creates a new table with the given coordinates and dimensions
-
.new(rect : Rectangle)
creates a new table using the given rect
Instance Method Summary
-
#add_row(row : Row)
adds the row to the end (bottom) of the table
- #rect : Hpdf::Rectangle
- #rect=(rect : Hpdf::Rectangle)
-
#render(page : Page, &block : Table | Row | Cell, Rectangle -> )
render will call cell rendering for all cells.
-
#row(&)
creates a rows and yields the block with the newly created row and adds it to the end (bottom) of the table
-
#row_count
returns the number of rows
-
#row_height
returns the height of each row
- #rows : Array(Hpdf::Row)
- #rows=(rows : Array(Hpdf::Row))
Constructor Detail
def self.new(x : Number, y : Number, width : Number, height : Number)
#
creates a new table with the given coordinates and dimensions
Instance Method Detail
render will call cell rendering for all cells. Then it will render the rectangles for the cell, row and table using the passed function
def row(&)
#
creates a rows and yields the block with the newly created row and adds it to the end (bottom) of the table