- From: Ian Hickson <ian@hixie.ch>
- Date: Tue, 20 Aug 2013 22:36:23 +0000 (UTC)
- To: Rik Cabanier <cabanier@gmail.com>
- Cc: whatwg@lists.whatwg.org
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: context.beginPath(); context.rect(0,0,100,100); context.rect(50,50,150,150); context.fill(); ...should do the same as this: var p1 = new Path(); p1.rect(0,0,100,100); var p2 = new Path();s p2.rect(50,50,150,150); var p = new Path(); p.addPath(p1); p.addPath(p2); context.fill(p); ...for any combination of path commands where I've put the rect()s. > > > 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 helpful. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 20 August 2013 22:36:52 UTC