[whatwg] Canvas size and double buffering.
bzbarsky at MIT.EDU
Wed Feb 3 10:07:06 PST 2010
On 2/3/10 1:01 PM, Tim Hutt wrote:
> Good point, it would be better to call it 'onresize' for consistency.
> So my revised suggestion is:
> 1. Support more length specifiers for the width and height of a
> canvas(%, em, etc.).
> 2. Add an onresize event to the canvas tag. When the canvas is resized
> it is reset and this event is fired.
> 3. CSS size specifiers resize rather than scale the canvas. I.e. it
> should always be that 1 unit = 1 pixel initially.
#3 would break existing canvas content.
#2 would work if all elements supported onresize (as has been proposed),
Given that, a resize handler could simply reset the canvas width/height
attrs if desired (thereby achieving #1 and the clearing aspect of #2), no?
Hence my question: what use cases here would not be covered simply by
having a general resize event on all elements?
More information about the whatwg