Next: Meta-Level Techniques
for
Up: No Title
Previous: User-Defined Layout
Schemes
The important features of our basic box layout algorithm have already been explained in the previous sections. This formalism provides the user with a fast and flexible layout algorithm, which is also easy to understand and anticipate. In order to keep this formalism simple, we decided to restrict the dependencies between boxes and fillers, i.e. their mutual influence on size and position of graphical objects. Boxes may be arbitrarily nested, but only fillers on the same box level compete for the available space. Figure 7 exemplifies this feature.
Figure 7: Schematic representation of nested boxes.
Arrows represent fillers.
The (vertical) fillers of level 1 are independent of the (vertical) fillers of level 3. This restriction reduces considerably the computational complexity of the layout algorithm. Another advantage is that the semantics of constrained fillers are easy to comprehend by the user. Even this scheme requires a simple relaxation algorithm for constraint satisfaction. Figure 8 illustrates our algorithm.
Figure 8: Water jugs modeling fillers.
Each water jug models a filler having a minimal and maximal expansion value. The current extension of a filler corresponds to the water level of a jug. The total space available to fillers is modeled by an external water reservoir with capacity . The extension of a filler is computed by the following steps:
The termination of this algorithm is guaranteed since each cycle either makes one jug inactive or removes water from the reservoir. If no jug becomes inactive at least one jug is filled to the level . The computation of the relaxation process uses integer arithmetic. Therefore, rounding errors are summed up and as final step this sum is rounded and added to the last filler.3
Next: Meta-Level Techniques
for
Up: No Title
Previous: User-Defined Layout
Schemes