[whatwg] Path API feedback
cabanier at gmail.com
Thu Sep 5 15:56:43 PDT 2013
On Tue, Aug 20, 2013 at 3:36 PM, Ian Hickson <ian at hixie.ch> wrote:
> On Fri, 26 Apr 2013, Rik Cabanier wrote:
> > I think an author would expect that 'addPathByStrokingPath' and other
> > path methods render as if you stroked/outlined directly on the canvas
> > context. Same goes for 'addPath'.
> > I believe very few people actually want the current behavior that's in
> > the spec.
> I don't know how true that is.
> It seems logical to me that this:
> ...should do the same as this:
> var p1 = new Path();
> var p2 = new Path();s
> var p = new Path();
> ...for any combination of path commands where I've put the rect()s.
Yes, that would be reasonable behavior since a path is just an aggregation
The problem happens when you call fill or stroke multiple times.
Now I want to create a region that covers what was drawn.
var p2 = new Path();s
var p = new Path();
'p' won't describe the same area as what was filled.
> > > > I think the spec needs to mention that
> > > > - sections of the path where both edges are filled should be removed
> > > > - winding needs to be done so eofill and fill give the same result
> > >
> > > I've filed a bug for adding something like this:
> > >
> > > https://www.w3.org/Bugs/Public/show_bug.cgi?id=21835
> > >
> > > I'm not sure exactly what the algorithm should be (as we discussed on
> > > IRC today), so if anyone has any input here, please don't hesitate to
> > > comment.
> > I can help if needed. I know the skia people are working on this as
> > well.
> > The algorithm is fairly straightforward to describe in prose.
> > Implementation is very hard though...
> Please do add such help as comments on the bug, that would be very
> Ian Hickson U+1047E )\._.,--....,'``. fL
> http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
> Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg