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

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

From: Stephen White <senorblanco@chromium.org>
Date: Fri, 9 Aug 2013 17:37:11 -0400
Message-ID: <CAPeKFTg-dmkuO_VcmRvfZ9KHcE3N1pYGCpjDW7dt+pqBpnFSew@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: WHAT Working Group <whatwg@whatwg.org>, Rik Cabanier <cabanier@gmail.com>
That's an interesting idea. I suppose the fully general solution would be
to have a "stroke offset". E.g., with a stroke width of 4 and and offset of
2 you'd get "outer", offset -2 you'd get "inner", offset 1 you'd get 3
pixels outer and 1 pixel inner, etc. Dunno how useful that is, though.

Stephen


On Fri, Aug 9, 2013 at 5:24 PM, Glenn Maynard <glenn@zewt.org> wrote:

> On Fri, Aug 9, 2013 at 4:17 PM, Stephen White <senorblanco@chromium.org>wrote:
>
>> If the stroke was instead drawn centered over half pixels, the stroked
>>
> rects would be centered along (5.5, 5.5) -> (14.5, 5.5) -> (14.5, 14.5) ->
>> (14.5, 5.5) -> (5.5, 5.5). This would touch pixels 5->15 in each
>> dimension.
>> If drawn with transparency, the resulting left and top edges would look
>> different than the bottom and right edges.  E.g.,
>> http://jsfiddle.net/9xbkX/
>
>
> My proposal addresses this, by adding an "outer" stroke mode.
> http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-July/040252.html
>
> --
> Glenn Maynard
>
>
Received on Friday, 9 August 2013 21:37:36 UTC

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