Previous Next Up Title Contents Index Top Library

6.12.4. ASSIGNING ATTRIBUTES DURING TRAVERSAL

During structure traversal, the state of a structure is saved before a lower level structure is called. When the traversal process reaches the end of a structure, we return to the higher level structure and the attributes and transformations return to the values they had at this level. The attributes and transformations are saved in a stack on which elements are automatically added before the call to a structure, and from which they are taken when we return to the calling structure. This attribute inheritance concept means that a structure can be called from several parent structures with different attribute values each time. The child structure can also modify the attribute and transformation values without affecting the environment of the parent structures.

During traversal, the system keeps a trace of the current value of the Traversal State List attributes. When a graphic primitive is analyzed the system verifies the ASF values of each attribute to determine if it must take the attribute from the Traversal State List or from an attribute bundle table of the workstation state list. The Traversal State List contains either an attribute specification or a bundle table index.

The current value of an attribute can be a default value, an inherited value or an assigned value which results from an attribute assigning element. Each time GPHIGS analyses a graphic primitive, it applies the current values of the attributes and transformations to it.

Figure 6.12.4.a


Previous Next Up Title Contents Index Top Library