class HexaPDF:: Layout:: InlineBox
Parent | Object |
---|
An InlineBox
wraps a regular Box
so that it can be used as an item for a Line
. This enables inline graphics.
Complete box auto-sizing is not possible since the available space cannot be determined beforehand! This means the box must have at least its width set. The height may either also be set or determined during fitting.
Fitting of the wrapped box via fit_wrapped_box
needs to be done before accessing any other method that uses the wrapped box. For fitting, a frame is used that has the width of the wrapped box and its height, or if not set, a practically infinite height. In the latter case the height must be set during fitting.
Attributes
Public Class Methods
Creates an InlineBox
that wraps a basic Box
. All arguments (except valign
) and the block are passed to Box::create
.
See ::new
for the valign
argument.
Public Instance Methods
Draws the wrapped box. If the box has margins specified, the x and y offsets are correctly adjusted.
Returns true
if this inline box is just a placeholder without drawing operations.
Fits the wrapped box, using the given context (see Frame#context
).
Returns the height of the wrapped box plus its top and bottom margins.
Returns the style of the wrapped box.
Returns the width of the wrapped box plus its left and right margins.
The maximum x-coordinate which is equivalent to the width of the inline box.
The minimum x-coordinate which is always 0.
The maximum y-coordinate which is equivalent to the height of the inline box.
The minimum y-coordinate which is always 0.