- From: Rik Cabanier <cabanier@gmail.com>
- Date: Thu, 25 Jul 2013 12:36:49 -0700
- To: Glenn Maynard <glenn@zewt.org>
- Cc: whatwg <whatwg@whatwg.org>
On Thu, Jul 25, 2013 at 7:05 AM, Glenn Maynard <glenn@zewt.org> wrote: > On Thu, Jul 25, 2013 at 12:24 AM, Rik Cabanier <cabanier@gmail.com> wrote: > > Yes, that's what I had in mind: the developer detects the device pixel >> ratio and scales up the canvas so the pixels match. >> > > That reduces to the simple case, then. The pixel ratio gets out of the > picture entirely if you adjust the canvas so it's rendered 1:1 to pixels, > so the rules for getting hard edges are the same (half-pixels for strokes, > integer pixels for fills). > Unfortunately, no. Let's say you have a device pixel ratio of 1.1 and a canvas of 100x100px. The underlying canvas bitmap should now be created as 110 x 110 pixels and your content should be scaled by 1.1. This will make everything blurry :-(
Received on Thursday, 25 July 2013 19:37:16 UTC