W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2013

[whatwg] Blurry lines in 2D Canvas (and SVG)

From: Rik Cabanier <cabanier@gmail.com>
Date: Tue, 23 Jul 2013 16:19:16 -0700
Message-ID: <CAGN7qDAdABj2NCNcc53qDd23Twq2=999u0Sio-gEsBJURrpCcg@mail.gmail.com>
To: whatwg@whatwg.org
All,

we've noticed that if you draw lines in canvas or SVG, they always end up
blurry.
For instance see this fiddle: http://jsfiddle.net/V92Gn/128/

This happens because you offset 1 pixel and then draw a half pixel stroke
on each side. Since it covers only half the pixel, the color gets mapped to
50% gray.
You can work around this by doing an extra offset of half the
devicepixelratio, but ideally this should never happen.

Is this behavior specified somewhere?
Is there a way to turn this off?
Received on Tuesday, 23 July 2013 23:19:41 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:03 UTC