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

[whatwg] Canvas size and double buffering.

From: Oliver Hunt <oliver@apple.com>
Date: Wed, 3 Feb 2010 11:23:16 -0800
Message-ID: <1FE32EDA-B907-4BBC-A060-599418DBF4C5@apple.com>

On Feb 3, 2010, at 10:01 AM, Tim Hutt wrote:

> On 3 February 2010 17:45, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>> On 2/3/10 12:22 PM, Tim Hutt wrote:
>>> 
>>> Yes it should be cleared and there should be a oncanvasresize() callback.
>> 
>> What uses cases does this cover that are not covered by a general resize
>> event?
> 
> 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.).

This doesn't really make sense for the backing buffer as it is logically defined in terms of pixel.

> 2. Add an onresize event to the canvas tag. When the canvas is resized
> it is reset and this event is fired.
We actually need this for webgl as well.

> 3. CSS size specifiers resize rather than scale the canvas. I.e. it
> should always be that 1 unit = 1 pixel initially.
This would break content
Received on Wednesday, 3 February 2010 11:23:16 UTC

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