W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2013

Re: [whatwg] [Canvas] Behavior on non-invertable CTM

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 23 Jul 2013 21:11:10 +0000 (UTC)
To: Dirk Schulze <dschulze@adobe.com>
Message-ID: <alpine.DEB.2.00.1307232104220.27623@ps20323.dreamhostps.com>
Cc: WHATWG List <whatwg@whatwg.org>
On Mon, 22 Jul 2013, Dirk Schulze wrote:
> > 
> > scale(0) is invalid, and should throw an exception.
> I don't think that we want to throw an exception on scale(0). No browser 
> does that today. WebKit did it in some places in the past but removed 
> the exceptions.

WebIDL says it should throw a TypeError, because it's missing an argument. 
(Step 4 of the overload resolution algorithm). Firefox, Chrome, and Safari 
all seem to do this.

> >> The second does setTransform(0,0,0,0,0,0), which should reset the CTM 
> >> to a zero matrix (again, not invertible). IE, Opera and FF draw a 
> >> line to 0,0 and close the path afterwards (which kind of makes sense, 
> >> since the universe is convoluted to one point). WebKit refuses the 
> >> lineTo command and closes the path as expected.
> > 
> > WebKit seems to just be wrong here, and the others right.
> Since this is not written in the spec

As far as I can tell, it _is_ written in the spec. scale(0,0) would reduce 
all coordinates and lines and so forth to 0,0. That's what the spec 
requires. I don't see the problem here.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 23 July 2013 21:11:34 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:03 UTC