W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2010

[whatwg] Canvas size and double buffering.

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 03 Feb 2010 13:07:06 -0500
Message-ID: <4B69BB4A.9070102@mit.edu>
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?

Received on Wednesday, 3 February 2010 10:07:06 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:20 UTC