W3C home > Mailing lists > Public > www-svg@w3.org > December 2013

new SVGMatrix() should return the identity matrix

From: Eric Seidel <eseidel@chromium.org>
Date: Sat, 30 Nov 2013 23:07:48 -0800
Message-ID: <CA+bb4fndxfZ8ScVVR=Zsf_kv-v+w+2a4zZdtb-JMyS85dnh3Dg@mail.gmail.com>
To: www-svg@w3.org
Cc: Philip Rogers <pdr@chromium.org>, Stephen Chenney <schenney@chromium.org>, Erik Dahlström <ed@opera.com>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:48 UTC