[html5] r1179 - /
whatwg at whatwg.org
whatwg at whatwg.org
Thu Jan 31 13:56:00 PST 2008
Author: ianh
Date: 2008-01-31 13:55:58 -0800 (Thu, 31 Jan 2008)
New Revision: 1179
Modified:
index
source
Log:
[go] (2) arcTo() fixes to line up with the only sane implementation, WebKit's.
Modified: index
===================================================================
--- index 2008-01-31 02:27:18 UTC (rev 1178)
+++ index 2008-01-31 21:55:58 UTC (rev 1179)
@@ -17112,32 +17112,64 @@
a subpath, then the behaviour depends on the arguments and the last point
in the subpath.
+ <p>Negative values for <var title="">radius</var> must cause the
+ implementation to raise an <code>INDEX_SIZE_ERR</code> exception.
+
<p>Let the point (<var title="">x0</var>, <var title="">y0</var>) be the
- last point in the subpath. Let <var title="">The Arc</var> be the shortest
- arc given by circumference of the circle that has one point tangent to the
- line defined by the points (<var title="">x0</var>, <var
- title="">y0</var>) and (<var title="">x1</var>, <var title="">y1</var>),
- another point tangent to the line defined by the points (<var
- title="">x1</var>, <var title="">y1</var>) and (<var title="">x2</var>,
- <var title="">y2</var>), and that has radius <var title="">radius</var>.
- The points at which this circle touches these two lines are called the
- start and end tangent points respectively.
+ last point in the subpath.
- <p>If the point (<var title="">x2</var>, <var title="">y2</var>) is on the
- line defined by the points (<var title="">x0</var>, <var
- title="">y0</var>) and (<var title="">x1</var>, <var title="">y1</var>)
- then the method must do nothing, as no arc would satisfy the above
- constraints.
+ <p>If the point (<var title="">x0</var>, <var title="">y0</var>) is equal
+ to the point (<var title="">x1</var>, <var title="">y1</var>), or if the
+ point (<var title="">x1</var>, <var title="">y1</var>) is equal to the
+ point (<var title="">x2</var>, <var title="">y2</var>), then the method
+ must add the point (<var title="">x1</var>, <var title="">y1</var>) to the
+ subpath, and connect that point to the previous point (<var
+ title="">x0</var>, <var title="">y0</var>) by a straight line.
- <p>Otherwise, the method must connect the point (<var title="">x0</var>,
- <var title="">y0</var>) to the start tangent point by a straight line,
- then connect the start tangent point to the end tangent point by <var
- title="">The Arc</var>, and finally add the start and end tangent points
- to the subpath.
+ <p>Otherwise, if the points (<var title="">x0</var>, <var
+ title="">y0</var>), (<var title="">x1</var>, <var title="">y1</var>), and
+ (<var title="">x2</var>, <var title="">y2</var>) all lie on a single
+ straight line, then: if the direction from (<var title="">x0</var>, <var
+ title="">y0</var>) to (<var title="">x1</var>, <var title="">y1</var>) is
+ the same as the direction from (<var title="">x1</var>, <var
+ title="">y1</var>) to (<var title="">x2</var>, <var title="">y2</var>),
+ then method must add the point (<var title="">x1</var>, <var
+ title="">y1</var>) to the subpath, and connect that point to the previous
+ point (<var title="">x0</var>, <var title="">y0</var>) by a straight line;
+ otherwise, the direction from (<var title="">x0</var>, <var
+ title="">y0</var>) to (<var title="">x1</var>, <var title="">y1</var>) is
+ the opposite of the direction from (<var title="">x1</var>, <var
+ title="">y1</var>) to (<var title="">x2</var>, <var title="">y2</var>),
+ and the method must add a point (<var title="">x<sub>&inf;</sub></var>,
+ <var title="">y<sub>&inf;</sub></var>) to the subpath, and connect that
+ point to the previous point (<var title="">x0</var>, <var
+ title="">y0</var>) by a straight line, where (<var
+ title="">x<sub>&inf;</sub></var>, <var title="">y<sub>&inf;</sub></var>)
+ is the point that is infinitely far away from (<var title="">x1</var>,
+ <var title="">y1</var>), that lies on the same line as (<var
+ title="">x0</var>, <var title="">y0</var>), (<var title="">x1</var>, <var
+ title="">y1</var>), and (<var title="">x2</var>, <var title="">y2</var>),
+ and that is on the same side of (<var title="">x1</var>, <var
+ title="">y1</var>) on that line as (<var title="">x2</var>, <var
+ title="">y2</var>).
- <p>Negative or zero values for <var title="">radius</var> must cause the
- implementation to raise an <code>INDEX_SIZE_ERR</code> exception.
+ <p>Otherwise, let <var title="">The Arc</var> be the shortest arc given by
+ circumference of the circle that has radius <var title="">radius</var>,
+ and that has one point tangent to the infinite line that crosses the point
+ (<var title="">x0</var>, <var title="">y0</var>) and ends at the point
+ (<var title="">x1</var>, <var title="">y1</var>), and that has a different
+ point tangent to the infinite line that ends at the point (<var
+ title="">x1</var>, <var title="">y1</var>) and crosses the point (<var
+ title="">x2</var>, <var title="">y2</var>). The points at which this
+ circle touches these two lines are called the start and end tangent points
+ respectively.
+ <p>The method must connect the point (<var title="">x0</var>, <var
+ title="">y0</var>) to the start tangent point by a straight line, adding
+ the start tangent point to the subpath, and then must connect the start
+ tangent point to the end tangent point by <var title="">The Arc</var>,
+ adding the end tangent point to the subpath.
+
<p>The <dfn id=arcx- title=dom-context-2d-arc><code>arc(<var
title="">x</var>, <var title="">y</var>, <var title="">radius</var>, <var
title="">startAngle</var>, <var title="">endAngle</var>, <var
Modified: source
===================================================================
--- source 2008-01-31 02:27:18 UTC (rev 1178)
+++ source 2008-01-31 21:55:58 UTC (rev 1179)
@@ -14682,36 +14682,72 @@
context <em>does</em> have a subpath, then the behaviour depends on
the arguments and the last point in the subpath.</p>
+ <p>Negative values for <var title="">radius</var> must cause the
+ implementation to raise an <code>INDEX_SIZE_ERR</code>
+ exception.</p>
+
<p>Let the point (<var title="">x0</var>, <var title="">y0</var>) be
- the last point in the subpath. Let <var title="">The Arc</var> be
- the shortest arc given by circumference of the circle that has one
- point tangent to the line defined by the points (<var
- title="">x0</var>, <var title="">y0</var>) and (<var
- title="">x1</var>, <var title="">y1</var>), another point tangent to
- the line defined by the points (<var title="">x1</var>, <var
- title="">y1</var>) and (<var title="">x2</var>, <var
- title="">y2</var>), and that has radius <var
- title="">radius</var>. The points at which this circle touches these
- two lines are called the start and end tangent points
- respectively.</p>
+ the last point in the subpath.</p>
- <p>If the point (<var title="">x2</var>, <var title="">y2</var>) is
- on the line defined by the points (<var title="">x0</var>, <var
- title="">y0</var>) and (<var title="">x1</var>, <var
- title="">y1</var>) then the method must do nothing, as no arc would
- satisfy the above constraints.</p>
+ <p>If the point (<var title="">x0</var>, <var title="">y0</var>) is
+ equal to the point (<var title="">x1</var>, <var title="">y1</var>),
+ or if the point (<var title="">x1</var>, <var title="">y1</var>) is
+ equal to the point (<var title="">x2</var>, <var title="">y2</var>),
+ then the method must add the point (<var title="">x1</var>, <var
+ title="">y1</var>) to the subpath, and connect that point to the
+ previous point (<var title="">x0</var>, <var title="">y0</var>) by a
+ straight line.</p>
- <p>Otherwise, the method must connect the point (<var
- title="">x0</var>, <var title="">y0</var>) to the start tangent
- point by a straight line, then connect the start tangent point to
- the end tangent point by <var title="">The Arc</var>, and finally
- add the start and end tangent points to the subpath.</p>
+ <p>Otherwise, if the points (<var title="">x0</var>, <var
+ title="">y0</var>), (<var title="">x1</var>, <var
+ title="">y1</var>), and (<var title="">x2</var>, <var
+ title="">y2</var>) all lie on a single straight line, then: if the
+ direction from (<var title="">x0</var>, <var title="">y0</var>) to
+ (<var title="">x1</var>, <var title="">y1</var>) is the same as the
+ direction from (<var title="">x1</var>, <var title="">y1</var>) to
+ (<var title="">x2</var>, <var title="">y2</var>), then method must
+ add the point (<var title="">x1</var>, <var title="">y1</var>) to
+ the subpath, and connect that point to the previous point (<var
+ title="">x0</var>, <var title="">y0</var>) by a straight line;
+ otherwise, the direction from (<var title="">x0</var>, <var
+ title="">y0</var>) to (<var title="">x1</var>, <var
+ title="">y1</var>) is the opposite of the direction from (<var
+ title="">x1</var>, <var title="">y1</var>) to (<var
+ title="">x2</var>, <var title="">y2</var>), and the method must add
+ a point (<var title="">x<sub>&inf;</sub></var>, <var
+ title="">y<sub>&inf;</sub></var>) to the subpath, and connect that
+ point to the previous point (<var title="">x0</var>, <var
+ title="">y0</var>) by a straight line, where (<var
+ title="">x<sub>&inf;</sub></var>, <var
+ title="">y<sub>&inf;</sub></var>) is the point that is infinitely
+ far away from (<var title="">x1</var>, <var title="">y1</var>), that
+ lies on the same line as (<var title="">x0</var>, <var
+ title="">y0</var>), (<var title="">x1</var>, <var
+ title="">y1</var>), and (<var title="">x2</var>, <var
+ title="">y2</var>), and that is on the same side of (<var
+ title="">x1</var>, <var title="">y1</var>) on that line as (<var
+ title="">x2</var>, <var title="">y2</var>).</p>
- <p>Negative or zero values for <var title="">radius</var> must cause
- the implementation to raise an <code>INDEX_SIZE_ERR</code>
- exception.</p>
+ <p>Otherwise, let <var title="">The Arc</var> be the shortest arc
+ given by circumference of the circle that has radius <var
+ title="">radius</var>, and that has one point tangent to the
+ infinite line that crosses the point (<var title="">x0</var>, <var
+ title="">y0</var>) and ends at the point (<var title="">x1</var>,
+ <var title="">y1</var>), and that has a different point tangent to
+ the infinite line that ends at the point (<var title="">x1</var>,
+ <var title="">y1</var>) and crosses the point (<var
+ title="">x2</var>, <var title="">y2</var>). The points at which this
+ circle touches these two lines are called the start and end tangent
+ points respectively.</p>
+ <p>The method must connect the point (<var title="">x0</var>, <var
+ title="">y0</var>) to the start tangent point by a straight line,
+ adding the start tangent point to the subpath, and then must connect
+ the start tangent point to the end tangent point by <var
+ title="">The Arc</var>, adding the end tangent point to the
+ subpath.</p>
+
<p>The <dfn title="dom-context-2d-arc"><code>arc(<var
title="">x</var>, <var title="">y</var>, <var title="">radius</var>,
<var title="">startAngle</var>, <var title="">endAngle</var>, <var
More information about the Commit-Watchers
mailing list