class Hpdf::Table

Overview

The table is the container for Row, which contain Cell.

Defined in:

hpdf/table.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(x : Number, y : Number, width : Number, height : Number) #

creates a new table with the given coordinates and dimensions


[View source]
def self.new(rect : Rectangle) #

creates a new table using the given rect


[View source]

Instance Method Detail

def add_row(row : Row) #

adds the row to the end (bottom) of the table


[View source]
def rect : Hpdf::Rectangle #

[View source]
def rect=(rect : Hpdf::Rectangle) #

[View source]
def render(page : Page, &block : Table | Row | Cell, Rectangle -> ) #

render will call cell rendering for all cells. Then it will render the rectangles for the cell, row and table using the passed function


[View source]
def row(&) #

creates a rows and yields the block with the newly created row and adds it to the end (bottom) of the table


[View source]
def row_count #

returns the number of rows


[View source]
def row_height #

returns the height of each row


[View source]
def rows : Array(Hpdf::Row) #

[View source]
def rows=(rows : Array(Hpdf::Row)) #

[View source]