new SVGMatrix() should return the identity matrix

Currently SVGMatrix() returns the zero matrix [1]

Yet SVGTransform() returns an identity transform [2]

CSSMatrix (when it was briefly specced [3] returned the identity as
does WebKitCSSMatrix and I suspect MSCSSMatrix).

It seems to me it would make more sense for SVGMatrix() to return the
identity matrix rather than the zero matrix.

It's much more common that you would want to start with the entity and
then modify it, rather than the zero matrix.

For example: "(new SVGMatrix).scale(2)" seems totally reasonable, and
would work perfectly if new SVGMatrix returned the identity.


1. http://www.w3.org/TR/SVG2/coords.html#InterfaceSVGMatrix
2. http://www.w3.org/TR/SVG2/coords.html#InterfaceSVGTransform
3. http://www.w3.org/TR/2011/WD-css3-2d-transforms-20111215/

Received on Monday, 2 December 2013 21:18:20 UTC