Graphic hierarchies

Graphic hierarchies are created by arranging graphics into a group as described in Chapter 10. The group may or may not have an attribute bundle and transformation matrix, and each graphic within the group probably has its own attribute bundles and might have their own transformation matrices.

When the TGroup::Draw function is called, the graphic state of the children is concatenated with the graphic state of the parent group. The attribute bundle settings of the children take precedence over the attribute bundle of the parent group so that the individual graphics are drawn with the correct colors, pen widths, and so forth. If an attribute is not present for a child, the attribute of the parent is used. The transformation matrices of the children are concatenated with the transformation matrix of the parent group. The parent's transform applies to the group as a whole, and the child's transform applies to the child only.

Concatenation occurs every time the Draw function is called, which creates a great deal of overhead. With a group, the Draw function creates the appropriate linked port class or classes so that the attribute bundle and matrix of the group are concatenated with the default graphic state only once to lower the overhead. The linked port classes are described under the heading "Linked ports" on page 368.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker