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

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

From: Rik Cabanier <cabanier@gmail.com>
Date: Mon, 12 Aug 2013 20:10:47 -0700
Message-ID: <CAGN7qDA8fe42MUR-Dt1sxtCnN=hPYLe6TcasSfjV+q+i-UmrjA@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: WHAT Working Group <whatwg@whatwg.org>, bdahl@mozilla.com, Stephen White <senorblanco@chromium.org>, w3c@junglecode.net
On Mon, Aug 12, 2013 at 6:45 PM, Glenn Maynard <glenn@zewt.org> wrote:

> On Sat, Aug 10, 2013 at 9:43 PM, Rik Cabanier <cabanier@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
>> does:
>> 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
> suggesting.
>

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.
Received on Tuesday, 13 August 2013 03:11:13 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:23 UTC