XFA Specification
Chapter 7, Layout for Growable Objects
Text Placement in Growable Containers
220
It may be helpful to think of transformations as occurring after growth. An object establishes its new
nominal content region in the coordinates it is comfortable with. Next, applies the box model
embellishment. Only then does it do transformations.
Growth in Growable Positioned Objects
Growth always occurs away from the
anchor point
in the directions defined by the
anchor point type.
For
example, a topRight anchored object will grow only to the bottom and the left, while a middleCenter
anchored object will grow evenly in all four directions.
When a positioned object grows, we say that the growth is visually destructive. That is, the growing object
may become large enough to overlap and obscure other sibling objects that occur beneath it according to
“Appearance Order (Z-Order)” on page 67.
Note that the overlap is apparent only in the presentation of
the objects, the obscured objects continue to exist in the form in their entirety.
Text Placement in Growable Containers
The rules for text placement discussed in
“Flowing Text Within a Container” on page 62
are modified when
the text is being placed within a growable container. The modified rules are described below. The
examples below use the same text as that used in the earlier chapter, reproduced again here:
To be, or not to be: that is the question:&nl;Whether 'tis nobler in the mind
to suffer&nl;The slings and arrows of outrageous fortune,&nl;Or to take arms
against a sea of troubles,&nl;And by opposing end them?
The sequence
“&nl;”
stands for the newline indicator.
Text Layout with Growable Width
When placing text into a growable-width region, the text
records are interpreted as lines. Printable characters in the
text are placed sequentially in the flow direction until a
newline character is encountered or a width limit is
reached. The layout processor then starts a new line and
places subsequent characters on the new line. The final
width of the region is equal to the width of the longest line
plus the width of the caption, if applicable. The caption
width is applicable if the caption is placed either at the left
or the right of the region.
To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them?
contentArea
draw
Extent of a paragraph
The figure at right shows the
layout extent,
or bounding
box, of a sample paragraph in solid black. The
draw
object containing the paragraph is being placed into a
contentArea
object. The extent of the
contentArea
is shown in dashed black.
If the field is positioned using its upper-left corner, lower-left corner, or the middle of the left edge it grows
to the right. That is, growth occurs by moving the left edge right on the page. If it is positioned using its
upper-right corner, lower-right corner, or the middle of the right edge it grows to the left. If the field is
positioned using either the middle of its top edge or the middle of its bottom edge it grows equally to the
right and left.
The
hAlign
attribute governs the placement of text within the container. When the container grows to
the left and
hAlign
has a value of
left
, or the container grows to the right and
hAlign
has a value of
right
, the
hAlign
setting forces the container to grow as much as it can within its own container, even
Home Index Bookmark Pages
Pages: Home Index All Pages