This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22674 - <canvas>: Aligning strokes inside or outside a path
Summary: <canvas>: Aligning strokes inside or outside a path
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other All
: P3 enhancement
Target Milestone: Needs Impl Interest
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
Depends on:
Reported: 2013-07-15 21:36 UTC by Ian 'Hixie' Hickson
Modified: 2019-03-29 20:02 UTC (History)
6 users (show)

See Also:


Description Ian 'Hixie' Hickson 2013-07-15 21:36:15 UTC
On Mon, 19 Jul 2010, Nick wrote:
> Canvas would benefit from a way to set stroke alignment. With the only
> available alignment being center, which is not very useful, custom paths
> have to be drawn to mimic inside and outside stroke alignment. That
> workaround may give unwanted transparency on pixels between a path and
> its stroke path once a path goes diagonal or curves.

On Mon, 19 Jul 2010, Mike Wilcox wrote:
> Wow, that would be so enormously useful. You make a shape, add a shape
> inside of it that is 100x100, add a stroke, get the width and it's 101.
> This "error" cascades, and shifts your items around on redraw. The math
> workaround is not easy.
Comment 1 Ian 'Hixie' Hickson 2013-09-05 22:09:08 UTC
On Fri, 9 Aug 2013, Stephen White wrote:
> 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.
Comment 2 Domenic Denicola 2019-03-29 20:02:02 UTC
W3C Bugzilla is closing down, and as such we're closing all feature request bugs against HTML as "WONTFIX", at least wontfix-in-this-bugtracker. (We've been told a read-only copy will remain online at these URLs.)

If you still think this feature is valuable, please feel free to open a new issue against ; the community has gotten much more active and involved since the Bugzilla days, and you might get a more useful dialogue there.