From: Dirk Schulze <vbs85@gmx.de>

Date: Sat, 27 Dec 2008 15:36:07 +0100

Message-ID: <1230388567.24188.1.camel@dirk-laptop>

Date: Sat, 27 Dec 2008 15:36:07 +0100

Message-ID: <1230388567.24188.1.camel@dirk-laptop>

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 vectors is 0. Now we want to calculate the two points on the tangents of the circle with the radius r. r is not null (first point of the specification for arcTo). Now put it to a system of equations and you won't get a solution. It's unresolveable. Why is something allowed, that is not calculateable? The next reason is, that infinite or NaN values are not alowed for lineTo and moveTo , ... . But it's possible to get support for infinte indirectly with arcTo (see comment above). And how to deal with a infinite far away point? A lineTo would never reach this point, it's infinite far away. Instead we have to draw a line parallel to the infinite long line, created by arcTo (and it's infinite long too). Please correct me if I missunderstood the specification. Dirk Am Samstag, den 27.12.2008, 10:37 +0100 schrieb 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(..). Wouldn't it draw a "quasi > parallel" line to the line of arcTo? Because (Xx, Yx) (mentioned in the > spec) is infinite far away. That means, we will never reach this point > in reality. > > 2) We don't allow infinite values for moveTo or lineTo, but can make > this happen with arcTo. > The example above would be the same as lineTo(-Infinite, 0); > But we can make moveTo(-Infinite, 0) too with the example above. Just > make strokeStyle transparent, use arcTo from above and you're done. And > moveTo(infinite, infinite); would be possible too. > > thanks DirkReceived on Saturday, 27 December 2008 06:36:07 UTC

*
This archive was generated by hypermail 2.4.0
: Wednesday, 22 January 2020 16:59:08 UTC
*