Class: HexaPDF::Layout::TextLayouter::Box
- Inherits:
-
Object
- Object
- HexaPDF::Layout::TextLayouter::Box
- Defined in:
- lib/hexapdf/layout/text_layouter.rb
Overview
Used for layouting. Describes an item with a fixed width, like an InlineBox or TextFragment.
Instance Attribute Summary collapse
-
#item ⇒ Object
readonly
The wrapped item.
Instance Method Summary collapse
-
#height ⇒ Object
The height of the item.
-
#initialize(item) ⇒ Box
constructor
Creates a new Box for the item.
-
#type ⇒ Object
Returns :box.
-
#width ⇒ Object
The width of the item.
Constructor Details
#initialize(item) ⇒ Box
Creates a new Box for the item.
81 82 83 |
# File 'lib/hexapdf/layout/text_layouter.rb', line 81 def initialize(item) @item = item end |
Instance Attribute Details
#item ⇒ Object (readonly)
The wrapped item.
78 79 80 |
# File 'lib/hexapdf/layout/text_layouter.rb', line 78 def item @item end |
Instance Method Details
#height ⇒ Object
The height of the item.
91 92 93 |
# File 'lib/hexapdf/layout/text_layouter.rb', line 91 def height @item.height end |
#type ⇒ Object
Returns :box.
96 97 98 |
# File 'lib/hexapdf/layout/text_layouter.rb', line 96 def type :box end |
#width ⇒ Object
The width of the item.
86 87 88 |
# File 'lib/hexapdf/layout/text_layouter.rb', line 86 def width @item.width end |