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

Re: new SVGMatrix() should return the identity matrix

From: Rik Cabanier <cabanier@gmail.com>
Date: Mon, 2 Dec 2013 15:10:43 -0800
Message-ID: <CAGN7qDD-BP2HgV2JC+=+2usLB=nhcXUUyssshx0tRABNG723bQ@mail.gmail.com>
To: Eric Seidel <eseidel@chromium.org>
Cc: www-svg <www-svg@w3.org>, Philip Rogers <pdr@chromium.org>, Stephen Chenney <schenney@chromium.org>, Erik Dahlström <ed@opera.com>
On Sat, Nov 30, 2013 at 11:07 PM, Eric Seidel <eseidel@chromium.org> wrote:

> 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).
>

DOMMatrix will create an identity matrix when you use the simple
constructor [1].
There are no plans to release SVGMatrix.


>
> 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/


1: http://dev.w3.org/fxtf/geometry/#dom-dommatrix-dommatrix
Received on Monday, 2 December 2013 23:11:12 UTC

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