Skip to content

Commit

Permalink
[giow] (3) Make arc() match reality better and contradict itself less.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23050
Affected topics: Canvas

git-svn-id: http://svn.whatwg.org/webapps@8294 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Nov 19, 2013
1 parent 594f473 commit 550a9ed
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 25 deletions.
22 changes: 14 additions & 8 deletions complete.html
Expand Up @@ -55270,20 +55270,26 @@ <h6 id=text-styles><span class=secno>4.12.4.2.5 </span>Text styles</h6>

<p>Consider an ellipse that has its origin at (<var title="">x</var>, <var title="">y</var>), that
has a major-axis radius <var title="">radiusX</var> and a minor-axis radius <var title="">radiusY</var>, and that is rotated about its origin such that its semi-major axis is
inclined <var title="">rotation</var> radians clockwise from the x-axis. The points at <var title="">startAngle</var> and <var title="">endAngle</var> along this circle's circumference,
measured in radians clockwise from the ellipse's semi-major axis, are the start and end points
respectively.</p>
inclined <var title="">rotation</var> radians clockwise from the x-axis.</p>

<p>If the <var title="">anticlockwise</var> argument is false and <span title=""><var title="">endAngle</var>-<var title="">startAngle</var></span> is equal to or greater than <span title="">2&pi;</span>, or, if the <var title="">anticlockwise</var> argument is <em>true</em> and
<span title=""><var title="">startAngle</var>-<var title="">endAngle</var></span> is equal to or
greater than <span title="">2&pi;</span>, then the arc is the whole circumference of this
ellipse.</p>
<p>If the <var title="">anticlockwise</var> argument is false and <span title=""><var title="">endAngle</var>-<var title="">startAngle</var></span> is equal to or greater than <span title="">2&pi;</span>, or, if the <var title="">anticlockwise</var> argument is <em>true</em>
and <span title=""><var title="">startAngle</var>-<var title="">endAngle</var></span> is equal
to or greater than <span title="">2&pi;</span>, then the arc is the whole circumference of this
ellipse, and the point at <var title="">startAngle</var> along this circle's circumference,
measured in radians clockwise from the ellipse's semi-major axis, acts as both the start point and
the end point.</p>

<p>Otherwise, the arc is the path along the circumference of this ellipse from the start point to
<!--CLEANUP-->
<p>Otherwise, the points at <var title="">startAngle</var> and <var title="">endAngle</var> along this circle's circumference,
measured in radians clockwise from the ellipse's semi-major axis, are the start and end points
respectively, and the arc is the path along the circumference of this ellipse from the start point to
the end point, going anti-clockwise if the <var title="">anticlockwise</var> argument is true, and
clockwise otherwise. Since the points are on the ellipse, as opposed to being simply angles from
zero, the arc can never cover an angle greater than <span title="">2&pi;</span> radians.</p>

<p class=note>Even if the arc covers the entire circumference of the ellipse and there are no
other points in the subpath, the path is not closed unless the <code title=dom-context-2d-closePath><a href=#dom-context-2d-closepath>closePath()</a></code> method is appropriately invoked.</p>

<p>Negative values for <var title="">radiusX</var> or <var title="">radiusY</var> must cause the
implementation to throw an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception.</p>

Expand Down
22 changes: 14 additions & 8 deletions index
Expand Up @@ -55270,20 +55270,26 @@ try {

<p>Consider an ellipse that has its origin at (<var title="">x</var>, <var title="">y</var>), that
has a major-axis radius <var title="">radiusX</var> and a minor-axis radius <var title="">radiusY</var>, and that is rotated about its origin such that its semi-major axis is
inclined <var title="">rotation</var> radians clockwise from the x-axis. The points at <var title="">startAngle</var> and <var title="">endAngle</var> along this circle's circumference,
measured in radians clockwise from the ellipse's semi-major axis, are the start and end points
respectively.</p>
inclined <var title="">rotation</var> radians clockwise from the x-axis.</p>

<p>If the <var title="">anticlockwise</var> argument is false and <span title=""><var title="">endAngle</var>-<var title="">startAngle</var></span> is equal to or greater than <span title="">2&pi;</span>, or, if the <var title="">anticlockwise</var> argument is <em>true</em> and
<span title=""><var title="">startAngle</var>-<var title="">endAngle</var></span> is equal to or
greater than <span title="">2&pi;</span>, then the arc is the whole circumference of this
ellipse.</p>
<p>If the <var title="">anticlockwise</var> argument is false and <span title=""><var title="">endAngle</var>-<var title="">startAngle</var></span> is equal to or greater than <span title="">2&pi;</span>, or, if the <var title="">anticlockwise</var> argument is <em>true</em>
and <span title=""><var title="">startAngle</var>-<var title="">endAngle</var></span> is equal
to or greater than <span title="">2&pi;</span>, then the arc is the whole circumference of this
ellipse, and the point at <var title="">startAngle</var> along this circle's circumference,
measured in radians clockwise from the ellipse's semi-major axis, acts as both the start point and
the end point.</p>

<p>Otherwise, the arc is the path along the circumference of this ellipse from the start point to
<!--CLEANUP-->
<p>Otherwise, the points at <var title="">startAngle</var> and <var title="">endAngle</var> along this circle's circumference,
measured in radians clockwise from the ellipse's semi-major axis, are the start and end points
respectively, and the arc is the path along the circumference of this ellipse from the start point to
the end point, going anti-clockwise if the <var title="">anticlockwise</var> argument is true, and
clockwise otherwise. Since the points are on the ellipse, as opposed to being simply angles from
zero, the arc can never cover an angle greater than <span title="">2&pi;</span> radians.</p>

<p class=note>Even if the arc covers the entire circumference of the ellipse and there are no
other points in the subpath, the path is not closed unless the <code title=dom-context-2d-closePath><a href=#dom-context-2d-closepath>closePath()</a></code> method is appropriately invoked.</p>

<p>Negative values for <var title="">radiusX</var> or <var title="">radiusY</var> must cause the
implementation to throw an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception.</p>

Expand Down
25 changes: 16 additions & 9 deletions source
Expand Up @@ -61253,23 +61253,30 @@ try {
<p>Consider an ellipse that has its origin at (<var data-x="">x</var>, <var data-x="">y</var>), that
has a major-axis radius <var data-x="">radiusX</var> and a minor-axis radius <var
data-x="">radiusY</var>, and that is rotated about its origin such that its semi-major axis is
inclined <var data-x="">rotation</var> radians clockwise from the x-axis. The points at <var
data-x="">startAngle</var> and <var data-x="">endAngle</var> along this circle's circumference,
measured in radians clockwise from the ellipse's semi-major axis, are the start and end points
respectively.</p>
inclined <var data-x="">rotation</var> radians clockwise from the x-axis.</p>

<p>If the <var data-x="">anticlockwise</var> argument is false and <span data-x=""><var
data-x="">endAngle</var>-<var data-x="">startAngle</var></span> is equal to or greater than <span
data-x="">2&pi;</span>, or, if the <var data-x="">anticlockwise</var> argument is <em>true</em> and
<span data-x=""><var data-x="">startAngle</var>-<var data-x="">endAngle</var></span> is equal to or
greater than <span data-x="">2&pi;</span>, then the arc is the whole circumference of this
ellipse.</p>
data-x="">2&pi;</span>, or, if the <var data-x="">anticlockwise</var> argument is <em>true</em>
and <span data-x=""><var data-x="">startAngle</var>-<var data-x="">endAngle</var></span> is equal
to or greater than <span data-x="">2&pi;</span>, then the arc is the whole circumference of this
ellipse, and the point at <var data-x="">startAngle</var> along this circle's circumference,
measured in radians clockwise from the ellipse's semi-major axis, acts as both the start point and
the end point.</p>

<p>Otherwise, the arc is the path along the circumference of this ellipse from the start point to
<!--CLEANUP-->
<p>Otherwise, the points at <var
data-x="">startAngle</var> and <var data-x="">endAngle</var> along this circle's circumference,
measured in radians clockwise from the ellipse's semi-major axis, are the start and end points
respectively, and the arc is the path along the circumference of this ellipse from the start point to
the end point, going anti-clockwise if the <var data-x="">anticlockwise</var> argument is true, and
clockwise otherwise. Since the points are on the ellipse, as opposed to being simply angles from
zero, the arc can never cover an angle greater than <span data-x="">2&pi;</span> radians.</p>

<p class="note">Even if the arc covers the entire circumference of the ellipse and there are no
other points in the subpath, the path is not closed unless the <code
data-x="dom-context-2d-closePath">closePath()</code> method is appropriately invoked.</p>

<p>Negative values for <var data-x="">radiusX</var> or <var data-x="">radiusY</var> must cause the
implementation to throw an <code>IndexSizeError</code> exception.</p>

Expand Down

0 comments on commit 550a9ed

Please sign in to comment.