This is an XSLT 2.0 transformation that calculates the matrix for a set of transformations that make up the transform attribute. It then removes the transform attribute and applies the transform matrix to all the coordinates in the XSLT transformation. The transformation is useful when you are animating between transformed and untransformed values.

For example:

<path transform="matrix(1.25,0,0,-1.25,0,744.095) translate(488.6641,203.0059)" class="a" 
 d="M0,0 Ll0,22.627 L3.433,0 L0,-19.545 L10.9,0 L 14.333,0 L0,0 z"  />

would be converted to:

<path class="a" d="M610.8,490.3L610.8,462.1L615.1,462.1L615.1,486.5L628.7,486.5L628.7,490.3L610.8,490.3Z"/>

The transformation can handle any number of transformations of all types that have been applied to the path.

The transform is particularly useful when an untransformed path is to be animated to a transformed path which is not easy to do in SVG otherwise.

In the example below, the three transformed 2 digits are shown at the top. The animation at the top has applied the transforms to the path and then animated the path. The lower one has animated the individual transforms. The top animation looks smoother than the lower one although it is less realistic.

No SVG plugin

10.1 Animating a transformed path