Skip to content

Commit

Permalink
Remove radiusY and rotation arguments from arcTo() method
Browse files Browse the repository at this point in the history
They are not implemented and nobody is interested.

Partially reverts e25d3f9.

Fixes whatwg#878.
  • Loading branch information
annevk authored and Alice Boxhall committed Jan 7, 2019
1 parent b110249 commit ecdf27b
Showing 1 changed file with 18 additions and 29 deletions.
47 changes: 18 additions & 29 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -59838,7 +59838,6 @@ interface mixin <dfn>CanvasPath</dfn> {
void <span data-x="dom-context-2d-quadraticCurveTo">quadraticCurveTo</span>(unrestricted double cpx, unrestricted double cpy, unrestricted double x, unrestricted double y);
void <span data-x="dom-context-2d-bezierCurveTo">bezierCurveTo</span>(unrestricted double cp1x, unrestricted double cp1y, unrestricted double cp2x, unrestricted double cp2y, unrestricted double x, unrestricted double y);
void <span data-x="dom-context-2d-arcTo">arcTo</span>(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radius); <!-- see ARC-ORDER note below -->
void <span data-x="dom-context-2d-arcTo">arcTo</span>(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation); <!-- see ARC-ORDER note below -->
void <span data-x="dom-context-2d-rect">rect</span>(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
void <span data-x="dom-context-2d-arc">arc</span>(unrestricted double x, unrestricted double y, unrestricted double radius, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false); <!-- see ARC-ORDER note below -->
void <span data-x="dom-context-2d-ellipse">ellipse</span>(unrestricted double x, unrestricted double y, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false); <!-- see ARC-ORDER note below -->
Expand Down Expand Up @@ -61192,19 +61191,14 @@ transform. ack Shaun Morris. -->

</dd>

<dt><var>context</var> . <code subdfn data-x="dom-context-2d-arcTo">arcTo</code>(<var>x1</var>, <var>y1</var>, <var>x2</var>, <var>y2</var>, <var>radiusX</var> [, <var>radiusY</var>, <var>rotation</var> ] )</dt>
<dt><var>path</var> . <code data-x="dom-context-2d-arcTo">arcTo</code>(<var>x1</var>, <var>y1</var>, <var>x2</var>, <var>y2</var>, <var>radiusX</var> [, <var>radiusY</var>, <var>rotation</var> ] )</dt>
<dt><var>context</var> . <code subdfn data-x="dom-context-2d-arcTo">arcTo</code>(<var>x1</var>, <var>y1</var>, <var>x2</var>, <var>y2</var>, <var>radius</var>)</dt>
<dt><var>path</var> . <code data-x="dom-context-2d-arcTo">arcTo</code>(<var>x1</var>, <var>y1</var>, <var>x2</var>, <var>y2</var>, <var>radius</var>)</dt>

<dd>

<p>Adds an arc with the given control points and radius to the current subpath, connected to the
previous point by a straight line.</p>

<p>If two radii are provided, then the first controls the width of the arc's ellipse, and the
second controls the height. If only one is provided, or if they are the same, then the arc is
from a circle. In the case of an ellipse, the rotation argument controls the clockwise
inclination of the ellipse relative to the x-axis.</p>

<p>Throws an <span>"<code>IndexSizeError</code>"</span> <code>DOMException</code> if the given
radius is negative.</p>

Expand Down Expand Up @@ -61647,20 +61641,16 @@ try {
<hr>

<p>The <dfn><code data-x="dom-context-2d-arcTo">arcTo(<var>x1</var>, <var>y1</var>, <var>x2</var>,
<var>y2</var>, <var>radiusX</var>, <var>radiusY</var>, <var>rotation</var>)</code></dfn> method,
when invoked, must run these steps:</p>
<var>y2</var>, <var>radius</var>)</code></dfn> method, when invoked, must run these steps:</p>

<ol>
<li><p>If any of the arguments are infinite or NaN, then return.</p></li>

<li><p><span>Ensure there is a subpath</span> for <span data-x="">(<var>x1</var>,
<var>y1</var>)</span>.</p></li>

<li><p>If either <var>radiusX</var> or <var>radiusY</var> are negative, then throw an
<span>"<code>IndexSizeError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>If <var>radiusY</var> is omitted, then set <var>radiusY</var> to
<var>radiusX</var>.</p></li>
<li><p>If <var>radius</var> is negative, then throw an <span>"<code>IndexSizeError</code>"</span>
<code>DOMException</code>.</p></li>

<li><p>Let the point (<var>x0</var>, <var>y0</var>) be the last point in the subpath, transformed
by the inverse of the <span data-x="dom-context-2d-transformation">current transformation
Expand All @@ -61669,26 +61659,25 @@ try {

<li><p>If the point (<var>x0</var>, <var>y0</var>) is equal to the point (<var>x1</var>,
<var>y1</var>), or if the point (<var>x1</var>, <var>y1</var>) is equal to the point
(<var>x2</var>, <var>y2</var>), or if both <var>radiusX</var> and <var>radiusY</var> are zero,
then add the point (<var>x1</var>, <var>y1</var>) to the subpath, and connect that point to the
previous point (<var>x0</var>, <var>y0</var>) by a straight line.</p></li>
(<var>x2</var>, <var>y2</var>), or if <var>radius</var> is zero, then add the point
(<var>x1</var>, <var>y1</var>) to the subpath, and connect that point to the previous point
(<var>x0</var>, <var>y0</var>) by a straight line.</p></li>

<li><p>Otherwise, if the points (<var>x0</var>, <var>y0</var>), (<var>x1</var>, <var>y1</var>),
and (<var>x2</var>, <var>y2</var>) all lie on a single straight line, then add the point
(<var>x1</var>, <var>y1</var>) to the subpath, and connect that point to the previous point
(<var>x0</var>, <var>y0</var>) by a straight line.</p></li>

<li><p>Otherwise, let <var>The Arc</var> be the shortest arc given by circumference of the
ellipse that has radius <var>radiusX</var> on the major axis and radius <var>radiusY</var> on the
minor axis, and whose semi-major axis is rotated <var>rotation</var> radians clockwise from the
positive x-axis, and that has one point tangent to the half-infinite line that crosses the point
(<var>x0</var>, <var>y0</var>) and ends at the point (<var>x1</var>, <var>y1</var>), and that has
a different point tangent to the half-infinite line that ends at the point (<var>x1</var>,
<var>y1</var>) and crosses the point (<var>x2</var>, <var>y2</var>). The points at which this
ellipse touches these two lines are called the start and end tangent points respectively. Connect
the point (<var>x0</var>, <var>y0</var>) to the start tangent point by a straight line, adding
the start tangent point to the subpath, and then connect the start tangent point to the end
tangent point by <var>The Arc</var>, adding the end tangent point to the subpath.</p></li>
<li><p>Otherwise, let <var>The Arc</var> be the shortest arc given by circumference of the circle
that has radius <var>radius</var>, and that has one point tangent to the half-infinite line that
crosses the point (<var>x0</var>, <var>y0</var>) and ends at the point (<var>x1</var>,
<var>y1</var>), and that has a different point tangent to the half-infinite line that ends at the
point (<var>x1</var>, <var>y1</var>) and crosses the point (<var>x2</var>, <var>y2</var>). The
points at which this circle touches these two lines are called the start and end tangent points
respectively. Connect the point (<var>x0</var>, <var>y0</var>) to the start tangent point by a
straight line, adding the start tangent point to the subpath, and then connect the start tangent
point to the end tangent point by <var>The Arc</var>, adding the end tangent point to the
subpath.</p></li>
</ol>

<hr>
Expand Down

0 comments on commit ecdf27b

Please sign in to comment.