Chapter 4. Areas
In Chapter 3, I discussed how pages are organized into sequences, how page masters are selected for processing, and how the page area is divided into regions. In this chapter, we will delve deeper into what happens on a page. We will go into some detail about page layout. After this, you should appreciate why the formatter produces output as it does, and perhaps have some sympathy with implementors.
Informal Definition of an Area
As you have seen in Chapter 3,
formatting objects contain data that should be rendered as a series of
marks on the canvas — text, images, lines, etc. The formatter turns
objects into series of imaginary rectangles on the page, called
areas. One object may produce more than one area:
e.g., an fo:block element produces
two areas if split by a page break, as shown in Figure 4-1.

Figure 4-1. A block split over a page boundary
FOs have properties that specify constraints on the appearance and
placement of areas generated by them. These constraints are used to
calculate area traits , which are attributes of areas that uniquely identify
their placement, appearance, and contents. Most properties and traits
have one-to-one correspondence: e.g., the color property unambiguously defines a trait
with the same name. But there are several cases where relations between
properties and traits are more complicated; they will be considered
later.
Tip
Traits are ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access