- From: Glenn Maynard <glenn@zewt.org>
- Date: Thu, 25 Jul 2013 17:59:10 -0500
- To: Rik Cabanier <cabanier@gmail.com>
- Cc: whatwg <whatwg@whatwg.org>
On Thu, Jul 25, 2013 at 3:49 PM, Rik Cabanier <cabanier@gmail.com> wrote: > You still need the scale though, otherwise the canvas content isn't zoomed > (which is what the user requested) > (We were talking about device pixel ratios, not zooming--user zooming scales the backing store, which is what we can't do anything about.) I think we're misunderstanding each other, but I'm not sure where. If you're on a 1.1x device, a 100x100 CSS "pixel" (px) box has 110x100 physical pixels. To draw cleanly into that box, you create a canvas with a 110x110 pixel backing store, and display it in the 100x100px region, eg. <canvas width=110 height=110 style="width: 100px; height: 100px;"> You don't do any scaling within the 2d canvas itself, you just draw to it like a 110x110-pixel canvas. -- Glenn Maynard
Received on Thursday, 25 July 2013 22:59:34 UTC