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

[whatwg] Canvas size and double buffering.

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 4 Feb 2010 20:32:36 +1300
Message-ID: <11e306601002032332i48805458xecbebd479e42c877@mail.gmail.com>
In general, keeping the canvas buffer size matching its rendered size so
that no resampling occurs requires clearing and repainting the canvas during
browser zoom changes as well as layout changes (and possibly during other
changes such as changes to the transforms of ancestors). It also requires
more than just getBoundingClientRect(). Authors can't do this without some
new feature(s). Perhaps something like an attribute "autoresize" which
automatically sets the buffer size, clears the canvas and fires a "redraw"
event at the canvas element whenever the ideal canvas buffer size changes?
Sounds like a v2 feature to me though. In the meantime, use SVG if you can.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100204/16c3f27b/attachment.htm>
Received on Wednesday, 3 February 2010 23:32:36 UTC

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