class Hpdf::Cell

Overview

The cell uses a simple captured block to render the cell content.

Defined in:

hpdf/table.cr

Constructors

Instance Method Summary

Instance methods inherited from class Hpdf::BaseCell

allow_grow=(allow_grow : Bool) allow_grow=, allow_grow? : Bool allow_grow?, grow_height : Float64 grow_height, rect : Rectangle | Nil rect, rect=(rect : Rectangle | Nil) rect=, render(page : Page) render, span : Float32 span, span=(span : Float32) span=

Constructor methods inherited from class Hpdf::BaseCell

new(*, span : Number = 1, allow_grow : Bool = false) new

Constructor Detail

def self.new(*, span : Number = 1, allow_grow = false, &block : Page, Rectangle -> ) #

Creates a cell with the provided block to render. The block provides a reference to the page and a rectange of the cell.

  • span a cell can expand more then one cell (in the right direction) the default value 1 means no extend

[View source]

Instance Method Detail

def block : Hpdf::Page, Hpdf::Rectangle -> Nil #

[View source]
def block=(block : Hpdf::Page, Hpdf::Rectangle -> _) #

[View source]
def grow_height : Float64 #
Description copied from class Hpdf::BaseCell

returns the factor by which the cell wants to grow in height


[View source]
def render(page : Page) #

renders the captured block


[View source]