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] Proposal: change 2D canvas currentTransform to getter method

2014-03-20 Thread Simon Sarris
On Thu, Mar 20, 2014 at 1:52 PM, Justin Novosad wrote: > Hello all, > > The recently added currentTransform attribute on CanvasRenderingContext2D > gives shared access to the rendering context's transform. By "shared", I > mean: > > a) this code modifies the CTM: > var matrix = context.currentTra

Re: [whatwg] Proposal: change 2D canvas currentTransform to getter method

2014-03-20 Thread Hwang, Dongseong
I totally agree on Justin. On Thu, Mar 20, 2014 at 7:52 PM, Justin Novosad wrote: > Hello all, > > The recently added currentTransform attribute on CanvasRenderingContext2D > gives shared access to the rendering context's transform. By "shared", I > mean: > > a) this code modifies the CTM: > var

Re: [whatwg] Proposal: change 2D canvas currentTransform to getter method

2014-03-20 Thread Rik Cabanier
On Thu, Mar 20, 2014 at 10:52 AM, Justin Novosad wrote: > Hello all, > > The recently added currentTransform attribute on CanvasRenderingContext2D > gives shared access to the rendering context's transform. By "shared", I > mean: > > a) this code modifies the CTM: > var matrix = context.currentTr

[whatwg] Proposal: change 2D canvas currentTransform to getter method

2014-03-20 Thread Justin Novosad
Hello all, The recently added currentTransform attribute on CanvasRenderingContext2D gives shared access to the rendering context's transform. By "shared", I mean: a) this code modifies the CTM: var matrix = context.currentTransform; matrix.a = 2; b) In this code, the second line modifies matrix

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

Re: [whatwg] [Canvas] Behavior on non-invertable CTM

2014-03-20 Thread Rik Cabanier
On Mon, Mar 17, 2014 at 2:41 PM, Rik Cabanier wrote: > > > > On Mon, Mar 17, 2014 at 2:30 PM, Justin Novosad wrote: > >> >> >> >> On Mon, Mar 17, 2014 at 2:18 PM, Rik Cabanier wrote: >> >>> >>> >>> >>> On Mon, Mar 17, 2014 at 1:47 PM, Justin Novosad wrote: >>> > > >> I hav

Re: [whatwg] Canvas Path.addPath SVGMatrix not optimal?

2014-03-20 Thread Justin Novosad
On Thu, Mar 20, 2014 at 11:23 AM, Rik Cabanier wrote: > > > > On Thu, Mar 20, 2014 at 7:01 AM, Justin Novosad wrote: > >> >> >> >> On Wed, Mar 19, 2014 at 5:47 PM, Rik Cabanier wrote: >> >>> >>> On Wed, Mar 19, 2014 at 2:22 PM, Justin Novosad wrote: >>> I agree it should be optional,

Re: [whatwg] Canvas Path.addPath SVGMatrix not optimal?

2014-03-20 Thread Rik Cabanier
On Thu, Mar 20, 2014 at 7:01 AM, Justin Novosad wrote: > > > > On Wed, Mar 19, 2014 at 5:47 PM, Rik Cabanier wrote: > >> >> On Wed, Mar 19, 2014 at 2:22 PM, Justin Novosad wrote: >> >>> >>> I agree it should be optional, but just to play devil's advocate : you >>> can >>> create an identity SVG

Re: [whatwg] Canvas Path.addPath SVGMatrix not optimal?

2014-03-20 Thread Justin Novosad
On Wed, Mar 19, 2014 at 5:47 PM, Rik Cabanier wrote: > > On Wed, Mar 19, 2014 at 2:22 PM, Justin Novosad wrote: >> >> >> I agree it should be optional, but just to play devil's advocate : you can >> create an identity SVGMatrix with a simpler bit of code. Just do this >> right >> after creating