class HexaPDF::Layout::TextLayouter::Result


Encapsulates the result of layouting items using a TextLayouter and provides a method for drawing the result (i.e. the layed out lines) on a canvas.



The actual height of all layed out lines (this includes a possible offset for the first line).


Array of layed out lines.


The remaining items that couldn’t be layed out.


The status after layouting the items:


There are no remaining items.


A single text or inline box was too wide to fit alone on a line.


There was not enough height for all items to layout.

Even if the result is not :success, the layouting may still be successful depending on the usage. For example, if we expect that there may be too many items to fit, :height is still a success.

Public Class Methods

new(status, lines, remaining_items)

Creates a new Result structure.

Public Instance Methods

draw(canvas, x, y)

Draws the layed out lines onto the canvas with the top-left corner being at [x, y].