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

[whatwg] [canvas] coordinate space definition bogus?

From: Dirk Schulze <dschulze@adobe.com>
Date: Tue, 29 Jan 2013 08:53:40 -0800
To: WHATWG List <whatwg@whatwg.org>
Message-ID: <2A7F62A9-ABF9-4A11-8C69-8A33850FB6A1@adobe.com>
Hi,

I think the definition of "coordinate space" is misleading in the specification.

""
The canvas element has two attributes to control the size of the coordinate space: width and height. 
""

This implies that the coordinate space is limited by this size. This is not the case. The coordinate space can be transformed and scaled all the time. In theory the size of the coordinate space is infinite. But the size of the surface could be defined by 'width' and 'height'.

The same problem occurs with the definition of clipping regions, that by default, depend on the size of the coordinate space. A simple scale and drawing over the size of the 'width' and 'height' values demonstrate that the clipping region can not be measured by the size of the coordinate space (or it could, if it is assumed to be infinite).

For clip, why isn't it possible to just say that clip() does not clip if there is no currentPath? This would at least avoid this trap.

Greetings,
Dirk
Received on Tuesday, 29 January 2013 16:54:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:12 GMT