class HexaPDF::Layout::Frame::FitResult

Parent

Stores the result of fitting a box in a Frame.

Attributes

available_height[RW]

The available height in the frame for this particular box.

available_width[RW]

The available width in the frame for this particular box.

box[RW]

The box that was fitted into the frame.

mask[RW]

The rectangle (a Geom2D::Polygon object) that will be removed from the frame when drawing the box.

x[RW]

The horizontal position where the box will be drawn.

y[RW]

The vertical position where the box will be drawn.

Public Class Methods

new(box)

Initialize the result object for the given box.

Public Instance Methods

draw(canvas)

Draws the box onto the canvas at (x, y).

The configuration option “debug” can be used to add visual debug output with respect to box placement.

success!()

Marks the fitting status as success.

success?()

Returns true if fitting was successful.