Previous Next


                                        930
CHAPTER 10                                                     Document Interchange



Content and Allocation Rectangles

As defined in Section 10.7.2, “Basic Layout Model,” an element’s content rectangle
is an enclosing rectangle derived from the shape of the element’s content, which
defines the bounds used for the layout of any included child elements. The
allocation rectangle includes any additional borders or spacing surrounding the
element, affecting how it is positioned with respect to adjacent elements and the
enclosing content rectangle or reference area.

The exact definition of the content rectangle depends on the element’s structure
type:

• For a table cell (structure type TH or TD), the content rectangle is determined
  from the bounding box of all graphics objects in the cell’s content, taking into
  account any explicit bounding boxes (such as the BBox entry in a form XOb-
  ject). This implied size can be explicitly overridden by the cell’s Width and
  Height attributes. The cell’s height is further adjusted to equal the maximum
  height of any cell in its row; its width is adjusted to the maximum width of any
  cell in its column.
• For any other BLSE, the height of the content rectangle is the sum of the heights
  of all BLSEs it contains, plus any additional spacing adjustments between these
  elements.
• For an ILSE that contains text, the height of the content rectangle is set by the
  LineHeight attribute. The width is determined by summing the widths of the
  contained characters, adjusted for any indents, letter spacing, word spacing, or
  line-end conditions.
• For an ILSE that contains an illustration or table, the content rectangle is deter-
  mined from the bounding box of all graphics objects in the content, taking into
  account any explicit bounding boxes (such as the BBox entry in a form XOb-
  ject). This implied size can be explicitly overridden by the element’s Width and
  Height attributes.
• For an ILSE that contains a mixture of elements, the height of the content rect-
  angle is determined by aligning the child objects relative to one another based
  on their text baseline (for text ILSEs) or end edge (for non-text ILSEs), along
  with any applicable BaselineShift attribute (for all ILSEs), and finding the ex-
  treme top and bottom for all elements.
  Note: Some applications may apply this process to all elements within the block;
  others may apply it on a line-by-line basis.

Previous Next