• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

5. Transforming the Coordinate System > Sequences of Transformations

Sequences of Transformations

It is possible to do more than one transformation on a graphic object. You just put the transformations, separated by whitespace, in the value of the transform attribute. Here is a rectangle that undergoes two transformations, a translation followed by a scaling. (The axes are drawn to show that the rectangle has, indeed, moved.)

<!-- draw axes -->
<line x1="0" y1="0" x2="0" y2="100" style="stroke: gray;"/>
<line x1="0" y1="0" x2="100" y2="0" style="stroke: gray;"/>

<rect x="10" y="10" height="15" width="20"
    transform="translate(30, 20) scale(2)"
    style="fill: gray;"/>

This is the equivalent of the following sequence of nested groups, and both will produce what you see in Figure 5-8.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint