Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove radiusY and rotation from arcTo() method #3371

Merged
merged 2 commits into from
Jan 23, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 17 additions & 23 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -59804,7 +59804,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 @@ -61208,8 +61207,8 @@ 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>

Expand Down Expand Up @@ -61663,20 +61662,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 @@ -61685,26 +61680,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>
ellipse that has radius <var>radius</var> on the major and minor axis, and that has one point
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use "circle" instead of "ellipse", and don't mention major/minor axis.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ellipse -> circle

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