C H A P T E R 1 3
Drawing and Graphics
Using the Drawing Interface
For example, you might nest arrays to create the hierarchy of shapes and styles
depicted in Figure 13-9.
Example of nested shape arrays
If the nested shape array depicted in Figure 13-9 were passed to the
function, the results summarized in Table 13-1 would occur.
The Transform Slot in Nested Shape Arrays
Within a single shape array, the
slot is treated like a style frame: only
one transform is active per array; if another transform is specified within the array,
the previous transform is overridden. Within nested arrays, however, the
slot is treated a little differently than most style slots. As the
descends into nested arrays of shapes, changes to the
cumulative; the resulting transform is the net sum of all the transforms in the
hierarchy. For example, if in Figure 13-9 startStyle has a transform of 10,10 and
Style 3 has a transform 50,0 then shapes 2a, 2b, 1, 3a would be drawn offset by
10,10 but Shape 3b would be drawn offset by 60,10.
Summary of drawing results