[whatwg] Blurry lines in 2D Canvas (and SVG)
cabanier at gmail.com
Mon Aug 12 20:10:47 PDT 2013
On Mon, Aug 12, 2013 at 6:45 PM, Glenn Maynard <glenn at zewt.org> wrote:
> On Sat, Aug 10, 2013 at 9:43 PM, Rik Cabanier <cabanier at gmail.com> wrote:
>> Ah, so you are relying on pixel snapping (=rounded up to 2 pixels).
> Rounded to the nearest integer pixel. If you give 1.25, the width would
> be 1.
>> If you can do that with your approach, why not with strokes that are
>> drawn from the center?
> It might be possible, in principle, to only snap the "border" of the
> stroke instead of the whole thing, but I don't know how to do that or if
> it'd be worthwhile. It seems like sharp lines are only particularly
> important for thin strokes (especially 1px), and in those cases the
> difference between a center and an outer stroke are minor. (I don't know
> if it's harder to implement, eg. so there's no gap between a fill followed
> by an outer stroke.)
> I was wondering if this is something that happens in Flash as well. It
>> turns out that there's an option called "hinting: Keep stroke anchors on
>> full pixels to prevent blurry lines." There's a blog post on what this
>> http://www.kaourantin.net/2005/08/stroke-hinting-in-flash-player-8-aka.html <http://www.kaourantin.net/2005/08/stroke-hinting-in-flash-player-8-aka.html>
> I don't know about this, but the description sounds similar to what I'm
Great! I think we're both on the same page on how the problem can be solved.
Do you still believe it's up to the author to do so, or are you leaning
towards solving it on the browser side?
I would also like to know if people see this as a problem that is worth
solving. Many of our Illustrator customers complain about this. We've tried
to fix it on the authoring side but it doesn't always work.
More information about the whatwg