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

Re: [whatwg] Canvas arcTo all points on a line

2009-04-30 Thread Ian Hickson
On Sat, 27 Dec 2008, Dirk Schulze wrote: have two questions to the all points on a line part of canvas' arcTo. A short example: moveTo(50,0); arcTo(100,0, 0,0, 10); This should add a new, from p1 infinite far away, point to the subpath and draw a straight line to it. Two

Re: [whatwg] Canvas arcTo all points on a line

2009-01-21 Thread Philip Taylor
On Sat, Dec 27, 2008 at 9:37 AM, Dirk Schulze vb...@gmx.de wrote: Hi, have two questions to the all points on a line part of canvas' arcTo. A short example: moveTo(50,0); arcTo(100,0, 0,0, 10); This should add a new, from p1 infinite far away, point to the subpath and draw a straight

Re: [whatwg] Canvas arcTo all points on a line

2009-01-21 Thread Calogero Alex Baldacchino
Philip Taylor ha scritto: But I don't know if it makes sense from the perspective of someone who's got to write an independent implementation of it. Does the above explanation make more sense than the text in the spec? and if so, does it seem implementable? If so, it seems best to keep the

Re: [whatwg] Canvas arcTo all points on a line

2009-01-21 Thread Philip Taylor
On Wed, Jan 21, 2009 at 2:45 PM, Philip Taylor excors+wha...@gmail.com wrote: On Sat, Dec 27, 2008 at 9:37 AM, Dirk Schulze vb...@gmx.de wrote: Hi, have two questions to the all points on a line part of canvas' arcTo. A short example: moveTo(50,0); arcTo(100,0, 0,0, 10); This should add

[whatwg] Canvas arcTo all points on a line

2008-12-27 Thread Dirk Schulze
Hi, have two questions to the all points on a line part of canvas' arcTo. A short example: moveTo(50,0); arcTo(100,0, 0,0, 10); This should add a new, from p1 infinite far away, point to the subpath and draw a straight line to it. Two questions. 1) If I add lineTo(50, 50); after arcTo(..).

Re: [whatwg] Canvas arcTo all points on a line

2008-12-27 Thread Dirk Schulze
I believe adding an infinite far away point is wrong and insteaed nothing should be drawn at all and I would like to explain my reason: Imagine 2 vectors. One from (x1, y1) to (x0, y0) and one from (x1, y1) to (x2, y2). For moveTo(100, 0); arcTo(150,0, 50, 0, 10); the angle between the two

Re: [whatwg] Canvas arcTo

2008-02-02 Thread Philip Taylor
On 31/01/2008, Ian Hickson [EMAIL PROTECTED] wrote: On Mon, 2 Jul 2007, Philip Taylor wrote: If the point (x2, y2) is on the line defined by the points (x0, y0) and (x1, y1) then the method must do nothing, as no arc would satisfy the above constraints. - why would no arc satisfy the

Re: [whatwg] Canvas arcTo

2008-02-02 Thread Ian Hickson
On Sat, 2 Feb 2008, Philip Taylor wrote: The circle can't touch tangentially at two distinct points, but nothing said there had to be two distinct points. IIRC it used to say another point. It's certainly more explicitly now. About the updated specification: the method must add a point

Re: [whatwg] Canvas arcTo

2008-01-31 Thread Ian Hickson
On Mon, 2 Jul 2007, Philip Taylor wrote: As implemented, the operation of arcTo in Firefox (2, 3) and Opera (9.2, 9.5) is utterly unrelated to the spec and arguably crazy. At least Opera has the right spirit and tries drawing arcs between points, though they're the wrong points and they're

Re: [whatwg] Canvas arcTo

2007-07-03 Thread Philip Taylor
if the radius is finite. Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Philip Taylor Sent: Monday, July 02, 2007 1:42 PM To: WHATWG Subject: [whatwg] Canvas arcTo If the point (x2, y2) is on the line defined by the points (x0, y0) and (x1, y1

[whatwg] Canvas arcTo

2007-07-02 Thread Philip Taylor
As implemented, the operation of arcTo in Firefox (2, 3) and Opera (9.2, 9.5) is utterly unrelated to the spec and arguably crazy. At least Opera has the right spirit and tries drawing arcs between points, though they're the wrong points and they're always semicircles. Safari nearly matches the

Re: [whatwg] Canvas arcTo

2007-07-02 Thread Kristof Zelechovski
Subject: [whatwg] Canvas arcTo If the point (x2, y2) is on the line defined by the points (x0, y0) and (x1, y1) then the method must do nothing, as no arc would satisfy the above constraints. - why would no arc satisfy the constraints? If P0, P1, P2 are collinear and non-coincident, then (I think) any