Re: [whatwg] addPath and CanvasPathMethods

2014-03-21 Thread Rik Cabanier
On Fri, Mar 21, 2014 at 11:52 AM, Joe Gregorio wrote: > > On Fri, Mar 21, 2014 at 12:17 AM, Rik Cabanier wrote: > >> On Thu, Mar 20, 2014 at 4:24 PM, Robert O'Callahan > >wrote: >> > An implementation can turn #2 into #1 if the paths obviously don't >> > overlap. If they might overlap, the author

Re: [whatwg] addPath and CanvasPathMethods

2014-03-21 Thread Joe Gregorio
On Fri, Mar 21, 2014 at 12:17 AM, Rik Cabanier wrote: > On Thu, Mar 20, 2014 at 4:24 PM, Robert O'Callahan >wrote: > > An implementation can turn #2 into #1 if the paths obviously don't > > overlap. If they might overlap, the author probably shouldn't be doing > the > > latter! > > > > For this

Re: [whatwg] addPath and CanvasPathMethods

2014-03-20 Thread Rik Cabanier
On Thu, Mar 20, 2014 at 4:24 PM, Robert O'Callahan wrote: > On Fri, Mar 21, 2014 at 8:15 AM, Justin Novosad wrote: > >> Sorry for the confusion, the point I was trying to make was unrelated to >> the CTM question (almost). My point is that the tesselation of a path is >> something that can be cac

Re: [whatwg] addPath and CanvasPathMethods

2014-03-20 Thread Robert O'Callahan
On Fri, Mar 21, 2014 at 8:15 AM, Justin Novosad wrote: > Sorry for the confusion, the point I was trying to make was unrelated to > the CTM question (almost). My point is that the tesselation of a path is > something that can be cached in a Path2D object. > > If you do this, you can take advantag

Re: [whatwg] addPath and CanvasPathMethods

2014-03-20 Thread Justin Novosad
On Thu, Mar 20, 2014 at 4:22 PM, Rik Cabanier wrote: > > > > On Thu, Mar 20, 2014 at 12:15 PM, Justin Novosad wrote: > >> Sorry for the confusion, the point I was trying to make was unrelated to >> the CTM question (almost). My point is that the tessellation of a path is >> something that can be

Re: [whatwg] addPath and CanvasPathMethods

2014-03-20 Thread Rik Cabanier
On Thu, Mar 20, 2014 at 12:15 PM, Justin Novosad wrote: > Sorry for the confusion, the point I was trying to make was unrelated to > the CTM question (almost). My point is that the tessellation of a path is > something that can be cached in a Path2D object. > Path2D does not contain the winding

Re: [whatwg] addPath and CanvasPathMethods

2014-03-20 Thread Justin Novosad
Sorry for the confusion, the point I was trying to make was unrelated to the CTM question (almost). My point is that the tesselation of a path is something that can be cached in a Path2D object. If you do this, you can take advantage of the cached tessellation: (apply tranform 1 to ctx) ctx.fill(p

Re: [whatwg] addPath and CanvasPathMethods

2014-03-20 Thread Dirk Schulze
On Mar 20, 2014, at 7:44 PM, Justin Novosad wrote: > This would apply the CTM to the incoming path, correct? I am a little bit > concerned that this API could end up being used in ways that would cancel > some of the performance benefits (internal caching opportunities) of Path2D > objects.

Re: [whatwg] addPath and CanvasPathMethods

2014-03-20 Thread Justin Novosad
This would apply the CTM to the incoming path, correct? I am a little bit concerned that this API could end up being used in ways that would cancel some of the performance benefits (internal caching opportunities) of Path2D objects. On Thu, Mar 20, 2014 at 1:49 PM, Dirk Schulze wrote: > On Mar

Re: [whatwg] addPath and CanvasPathMethods

2014-03-20 Thread Dirk Schulze
On Mar 20, 2014, at 6:31 PM, Rik Cabanier wrote: > addPath is currently defined on the Path2D object. [1] > Is there a reason why it's not defined on CanvasPathMethods instead? That > way this method is available on the 2d contest so you can append a path to > the current graphics state. > > Thi

[whatwg] addPath and CanvasPathMethods

2014-03-20 Thread Rik Cabanier
addPath is currently defined on the Path2D object. [1] Is there a reason why it's not defined on CanvasPathMethods instead? That way this method is available on the 2d contest so you can append a path to the current graphics state. This would also negate the need for setCurrentPath. 1: http://www