class HexaPDF:: Layout:: Box:: FitResult
Parent | Object |
---|
Stores the result of fitting a box in a frame.
Attributes
The box that was fitted into the frame.
The frame into which the box was fitted.
The rectangle (a Geom2D::Rectangle object) that will be removed from the frame when drawing the box.
The status result of fitting the box in the frame.
Allowed values are:
:failure
-
(default) Indicates fitting the box has failed.
:success
-
Indicates that the box was completely fitted.
:overflow
-
Indicates that only a part of the box was fitted.
The horizontal position where the box will be drawn.
The vertical position where the box will be drawn.
Public Class Methods
Initializes the result object for the given box and, optionally, frame.
Public Instance Methods
Draws the box
onto the canvas at (x
+ dx, y
+ dy).
The relative offset (dx, dy) is useful when rendering results that were accumulated and then need to be moved because the container holding them changes its position.
The configuration option “debug” can be used to add visual debug output with respect to box placement.
Returns true
if fitting was a failure.
Sets the result status to overflow.
Returns true
if only parts of the box were fitted.
Resets the result object.
Sets the result status to success.
Returns true
if fitting was successful.