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.
-
#inspect ⇒ Object
:nodoc:.
-
#type ⇒ Object
Returns :box.
-
#width ⇒ Object
The width of the item.
Constructor Details
#initialize(item) ⇒ Box
Creates a new Box for the item.
85 86 87 |
# File 'lib/hexapdf/layout/text_layouter.rb', line 85 def initialize(item) @item = item end |
Instance Attribute Details
#item ⇒ Object (readonly)
The wrapped item.
82 83 84 |
# File 'lib/hexapdf/layout/text_layouter.rb', line 82 def item @item end |
Instance Method Details
#height ⇒ Object
The height of the item.
95 96 97 |
# File 'lib/hexapdf/layout/text_layouter.rb', line 95 def height @item.height end |
#inspect ⇒ Object
:nodoc:
104 105 106 |
# File 'lib/hexapdf/layout/text_layouter.rb', line 104 def inspect #:nodoc: "Box[#{@item.inspect}]" end |
#type ⇒ Object
Returns :box.
100 101 102 |
# File 'lib/hexapdf/layout/text_layouter.rb', line 100 def type :box end |
#width ⇒ Object
The width of the item.
90 91 92 |
# File 'lib/hexapdf/layout/text_layouter.rb', line 90 def width @item.width end |