Re: [whatwg] Canvas arcTo method

2012-09-12 Thread Michael Day
Hi Ian, Yeah, that's why the spec hand-waves to transform the line too... but I agree that that doesn't really work. Do you have any suggestion of how to spec this better? This is the most general arcTo situation: setTransform(M0) lineTo(x0, y0) setTransform(M) arcTo(x1, y1,

Re: [whatwg] Canvas arcTo method

2012-09-04 Thread Justin Novosad
On Mon, Sep 3, 2012 at 8:58 AM, Ian Hickson i...@hixie.ch wrote: Does it work if you just transform all the points and the line? (Yeah, that's still way too vague. I'm not sure how to really specify this in a manner that's both unambiguous and clear. Any suggestions?) I am not 100% sure that

Re: [whatwg] Canvas arcTo method

2012-09-03 Thread Ian Hickson
On Mon, 20 Aug 2012, Michael Day wrote: The camvas arcTo method generates an arc that touches two tangent lines. The first tangent line is from the last point in the previous subpath to the first point passed to the arcTo method. What happens in this situation: ctx.lineTo(100, 100);

Re: [whatwg] Canvas arcTo method

2012-08-20 Thread Rik Cabanier
Hi Michael, in your case, the first control point is not the same as the last point of the subpath. The 'scale(2,1)' set up a different coordinate system. You can rewrite your code from this: ctx.lineTo(100, 100); ctx.scale(2, 1); ctx.arcTo(100, 100, 100, 200, 100); to this: ctx.scale(2, 1);

Re: [whatwg] Canvas arcTo method

2012-08-20 Thread Michael Day
Hi Rik, The 'scale(2,1)' set up a different coordinate system. You can rewrite your code from this: ctx.lineTo(100, 100); ctx.scale(2, 1); ctx.arcTo(100, 100, 100, 200, 100); to this: ctx.scale(2, 1); *ctx.lineTo(50, 100);* ctx.arcTo(100, 100, 100, 200, 100); Right,

Re: [whatwg] Canvas arcTo method

2012-08-20 Thread Rik Cabanier
On Mon, Aug 20, 2012 at 5:55 PM, Michael Day mike...@yeslogic.com wrote: Hi Rik, The 'scale(2,1)' set up a different coordinate system. You can rewrite your code from this: ctx.lineTo(100, 100); ctx.scale(2, 1); ctx.arcTo(100, 100, 100, 200, 100); to this:

Re: [whatwg] Canvas arcTo method

2012-08-20 Thread Michael Day
Hi Rik, Yes, that is one way of implementing it. This is not specific to arcTo; this happens with all drawing operators. It is not quite the same with other drawing operators, for example: ctx.setTransform(...T1...); ctx.lineTo(100, 100); ctx.setTransform(...T2...); ctx.lineTo(100, 100);

Re: [whatwg] Canvas arcTo method

2012-08-20 Thread Rik Cabanier
On Mon, Aug 20, 2012 at 8:15 PM, Michael Day mike...@yeslogic.com wrote: Hi Rik, Yes, that is one way of implementing it. This is not specific to arcTo; this happens with all drawing operators. It is not quite the same with other drawing operators, for example:

Re: [whatwg] Canvas arcTo method

2012-08-20 Thread Michael Day
Hi Rik, Yes you can go to absolute canvas coordinates but you need to remember that the radius is transformed too. You cannot transform the three control points, and then generate the arc. If you do this, you will always get circular arcs, whereas a scale(2, 1) will produce an elliptical

[whatwg] Canvas arcTo method

2012-08-19 Thread Michael Day
Hi, The camvas arcTo method generates an arc that touches two tangent lines. The first tangent line is from the last point in the previous subpath to the first point passed to the arcTo method. What happens in this situation: ctx.lineTo(100, 100); ctx.scale(2, 1); ctx.arcTo(100, 100, 100,

Re: [whatwg] Canvas arcTo method

2012-08-19 Thread Michael Day
Firefox and Chrome do not do this, as can be seen by viewing the attached HTML file. Or since attachments are stripped, here is the file: http://www.princexml.com/arcto.html Cheers, Michael