-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 --> | ||
|
@@ -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> | ||
|
||
|
@@ -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 | ||
|
@@ -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 | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.