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

Re: new SVGMatrix() should return the identity matrix

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 2 Dec 2013 15:21:13 -0800
Message-ID: <CAAWBYDD5EuUYEymzVNZM6oMeef9VQneAdnznm7L5rN5JY58QBg@mail.gmail.com>
To: Dirk Schulze <dschulze@adobe.com>
Cc: Eric Seidel <eseidel@chromium.org>, www-svg <www-svg@w3.org>, Philip Rogers <pdr@chromium.org>, Stephen Chenney <schenney@chromium.org>, Erik Dahlstrom <ed@opera.com>
On Mon, Dec 2, 2013 at 3:04 PM, Dirk Schulze <dschulze@adobe.com> wrote:
> On Dec 2, 2013, at 10:32 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> Since the simplest behavior for undefined (just convert it to a
>> number, resulting in NaN) is useless, the second behavior of turning
>> null/undefined into zero is obviously the best behavior for arbitrary
>> undefined arguments.  We don't want a different behavior between
>> DOMMatrix() and DOMMatrix(undefined), nor between DOMMatrix(undefined)
>> and DOMMatrix(0).
>
> I strongly disagree on this. At least without arguments, authors nearly always want to have the identity transformation matrix. That is what is currently specified[1]. Well at least it was before we used a different preprocessor.

I don't understand what you mean.  I'm looking at the source, and it's
simply not specified.  What on earth could lead to switching
preprocessors causing a loss of information in the source document?

> Of course, we could introduce a function called identity() which makes the matrix the identity matrix. However, this would nearly always be called by authors and seems to be a useless requirement.

People use matrices for more than just transforms, and having a zero
matrix is useful for plenty of other things.  (At least, as a starting
point.)

On the other hand, most of these other uses want arbitrary matrixes,
while DOMMatrix is limited to 2x3 or 4x4.  In this limited case, I
agree that the identity matrix is probably the most useful.

> I even could think about support 6 or 16 value for setting the transformation function. This is actually very common anyway.

What do you mean by this?

~TJ
Received on Monday, 2 December 2013 23:22:00 UTC

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