Class | Prawn::Table::Cell |
In: |
lib/prawn/table/cell.rb
|
Parent: | Object |
A cell is a special-purpose bounding box designed to flow text within a bordered area. This is used by Prawn‘s Document::Table implementation but can also be used standalone for drawing text boxes via Document#cell
align | [RW] | |
background_color | [RW] | |
border_color | [RW] | |
border_style | [RW] | |
border_width | [RW] | |
borders | [RW] | |
document | [RW] | |
horizontal_padding | [RW] | |
point | [RW] | |
text_color | [RW] | |
vertical_padding | [RW] |
Creates a new cell object. Generally used indirectly via Document#cell
Of the available options listed below, :point, :width, and :text must be provided. If you are not using the Document#cell shortcut, the :document must also be provided.
:point: | Absolute [x,y] coordinate of the top-left corner of the cell. |
:document: | The Prawn::Document object to render on. |
:text: | The text to be flowed within the cell |
:text_color: | The color of the text to be displayed |
:width: | The width in PDF points of the cell. |
:height: | The height in PDF points of the cell. |
:horizontal_padding: | The horizontal padding in PDF points |
:vertical_padding: | The vertical padding in PDF points |
:padding: | Overrides both horizontal and vertical padding |
:align: | One of :left, :right, :center |
:borders: | An array of sides which should have a border. Any of :top, :left, :right, :bottom |
:border_width: | The border line width. Defaults to 1. |
:border_style: | One of :all, :no_top, :no_bottom, :sides, :none, :bottom_only. Defaults to :all. |
:border_color: | The color of the cell border. |
:font_size: | The font size for the cell text. |