class HexaPDF:: Layout:: TableBox:: Cell
Parent | HexaPDF::Layout::Box |
---|
Represents a single cell of the table.
A cell is a container box that fits and draws its children with a BoxFitter
. Its dimensions (width and height) are not determined by its children but by the table layout algorithm. Furthermore, its style can be used for drawing e.g. a cell border.
Cell
borders work similar to the separated borders model of CSS, i.e. each cell has its own borders that do not overlap.
Attributes
The number of columns this cell spans.
The 0-based column number of the cell.
The x-coordinate of the cell’s top-left corner.
The coordinate is relative to the table’s content rectangle, with positive x-axis going to the right and positive y-axis going to the bottom.
This value is set by the parent Cells
object during fitting and may therefore only be relied on afterwards.
The 0-based row number of the cell.
The number of rows this cell spans.
The y-coordinate of the cell’s top-left corner.
The coordinate is relative to the table’s content rectangle, with positive x-axis going to the right and positive y-axis going to the bottom.
This value is set by the parent Cells
object during fitting and may therefore only be relied on afterwards.
Public Class Methods
Creates a new Cell
instance.
HexaPDF::Layout::Box::new
Public Instance Methods
Returns true
if the cell has no content.
HexaPDF::Layout::Box#empty?
Updates the height of the box to the given value.
The height
has to be greater than or equal to the fitted height.