September 2009
Intermediate to advanced
472 pages
16h 45m
English
Every object in SVG has its own natural place on the canvas. For example, for a rectangle, this place is defined by the x and y attributes on the rect element:
<rect id="rect2310"
y="350"
x="100"
width="300"
height="150" />However, one of the most interesting features of SVG is that this position can be affected by the transform attribute. Most often, this attribute contains a sequence of six numbers inside a matrix(...):
<rect transform="matrix(0.96333,0.26831,-0.26831,0.96333,203.200,-160.066)"
id="rect2310"
y="350"
x="100"
width="300"
height="150" />In this form, the attribute represents an affine transform matrix. A complete treatment of matrix algebra is way outside the scope of this book, but you should have an idea of ...
Read now
Unlock full access