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

[whatwg] Canvas size and double buffering.

From: Tim Hutt <tdhutt@gmail.com>
Date: Wed, 3 Feb 2010 23:12:21 +0000
Message-ID: <c120886e1002031512u7ee8f308p2b9a19677a1f494c@mail.gmail.com>
On 3 February 2010 20:14, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> Yep. ?canvas.width = canvas.getBoundingClientRect().width;

Ah yes that works nicely, with one minor caveat: it seems to include
the width of the border if there is one, so you have to take that into
account. You're right, this is a better solution.

Cheers.
Received on Wednesday, 3 February 2010 15:12:21 UTC

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