[html5] r8541 - [giow] (0) Make the canvas text APIs not create a new subpath at the end, since [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Mar 12 15:34:29 PDT 2014
Author: ianh
Date: 2014-03-12 15:34:28 -0700 (Wed, 12 Mar 2014)
New Revision: 8541
Modified:
complete.html
index
source
Log:
[giow] (0) Make the canvas text APIs not create a new subpath at the end, since the last coordinate is so unpredictable.
Affected topics: Canvas
Modified: complete.html
===================================================================
--- complete.html 2014-03-12 22:21:34 UTC (rev 8540)
+++ complete.html 2014-03-12 22:34:28 UTC (rev 8541)
@@ -56064,6 +56064,11 @@
closed subpath is one where the last point of the subpath is connected to the first point of the
subpath by a straight line. Subpaths with only one point are ignored when painting the path.</p>
+ <p><a href=#concept-path title=concept-path>Paths</a> have a <dfn id=need-new-subpath>need new subpath</dfn> flag. When this
+ flag is set, certain APIs create a new subpath rather than extending the previous one. When a
+ <a href=#concept-path title=concept-path>path</a> is created, its <a href=#need-new-subpath>need new subpath</a> flag must be
+ set.</p>
+
<p>When an object implementing the <code><a href=#canvaspathmethods>CanvasPathMethods</a></code> interface is created, its <a href=#concept-path title=concept-path>path</a> must be initialized to zero subpaths.</p>
<dl class=domintro><dt><var title="">context</var> . <code title=dom-context-2d-moveTo><a href=#dom-context-2d-moveto>moveTo</a></code>(<var title="">x</var>, <var title="">y</var>)</dt>
@@ -56469,9 +56474,9 @@
first (and only) point.</p>
<p>When the user agent is to <dfn id=ensure-there-is-a-subpath>ensure there is a subpath</dfn> for a coordinate (<var title="">x</var>, <var title="">y</var>) on a <a href=#concept-path title=concept-path>path</a>, the user
- agent must check to see if the <a href=#concept-path title=concept-path>path</a> has any subpaths, and if it
- does not, then the user agent must create a new subpath with the point (<var title="">x</var>,
- <var title="">y</var>) as its first (and only) point, as if the <code title=dom-context-2d-moveTo><a href=#dom-context-2d-moveto>moveTo()</a></code> method had been called.</p>
+ agent must check to see if the <a href=#concept-path title=concept-path>path</a> has its <a href=#need-new-subpath>need new
+ subpath</a> flag set. If it does, the user agent must create a new subpath with the point (<var title="">x</var>, <var title="">y</var>) as its first (and only) point, as if the <code title=dom-context-2d-moveTo><a href=#dom-context-2d-moveto>moveTo()</a></code> method had been called, and must then unset the
+ <a href=#concept-path title=concept-path>path</a>'s <a href=#need-new-subpath>need new subpath</a> flag.</p>
<p>The <dfn id=dom-context-2d-closepath title=dom-context-2d-closePath><code>closePath()</code></dfn> method must do nothing
@@ -56711,14 +56716,10 @@
</li>
- <li><p>Let (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) be the last point in the last subpath of <var title="">merged
- path</var>.</li>
-
<li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path>Path</a></code>
object.</li>
- <li><p>Create a new subpath in the <code><a href=#path>Path</a></code> object with (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) as the only point
- in the subpath.</li>
+ <li><p>Set the <code><a href=#path>Path</a></code> object's <a href=#need-new-subpath>need new subpath</a> flag.</li>
</ol><hr><p>The <dfn id=dom-path-withdata title=dom-Path-withdata><code>Path(<var title="">d</var>)</code></dfn> constructor
must run the following steps:</p>
@@ -56862,15 +56863,10 @@
</li>
-<!--CLEANUP-->
- <li><p>Let (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) be the last point in the last subpath of <var title="">merged path</var>.</li>
-
<li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path>Path</a></code>
object.</li>
-<!--CLEANUP-->
- <li><p>Create a new subpath in the <code><a href=#path>Path</a></code> object with (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) as the only point in
- the subpath.</li>
+ <li><p>Set the <code><a href=#path>Path</a></code> object's <a href=#need-new-subpath>need new subpath</a> flag.</li>
</ol><p>When one of the <code title=dom-path-addText><a href=#dom-path-addtext>addText()</a></code> and <code title=dom-path-addPathByStrokingText><a href=#dom-path-addpathbystrokingtext>addPathByStrokingText()</a></code> variants that take as
argument a <code><a href=#path>Path</a></code> object is invoked, the method must run the following algorithm:</p>
@@ -56977,14 +56973,9 @@
</li>
- <li><p>Let (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) be the last point in the last subpath of <var title="">merged
- path</var>.</li>
-
<li><p>Add all the subpaths in <var title="">merged path</var> to <var title="">target</var>.</li>
-<!--CLEANUP-->
- <li><p>Create a new subpath in <var title="">target</var> with (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) as the only point in
- the subpath.</li>
+ <li><p>Set the <code><a href=#path>Path</a></code> object's <a href=#need-new-subpath>need new subpath</a> flag.</li>
</ol></div>
Modified: index
===================================================================
--- index 2014-03-12 22:21:34 UTC (rev 8540)
+++ index 2014-03-12 22:34:28 UTC (rev 8541)
@@ -56064,6 +56064,11 @@
closed subpath is one where the last point of the subpath is connected to the first point of the
subpath by a straight line. Subpaths with only one point are ignored when painting the path.</p>
+ <p><a href=#concept-path title=concept-path>Paths</a> have a <dfn id=need-new-subpath>need new subpath</dfn> flag. When this
+ flag is set, certain APIs create a new subpath rather than extending the previous one. When a
+ <a href=#concept-path title=concept-path>path</a> is created, its <a href=#need-new-subpath>need new subpath</a> flag must be
+ set.</p>
+
<p>When an object implementing the <code><a href=#canvaspathmethods>CanvasPathMethods</a></code> interface is created, its <a href=#concept-path title=concept-path>path</a> must be initialized to zero subpaths.</p>
<dl class=domintro><dt><var title="">context</var> . <code title=dom-context-2d-moveTo><a href=#dom-context-2d-moveto>moveTo</a></code>(<var title="">x</var>, <var title="">y</var>)</dt>
@@ -56469,9 +56474,9 @@
first (and only) point.</p>
<p>When the user agent is to <dfn id=ensure-there-is-a-subpath>ensure there is a subpath</dfn> for a coordinate (<var title="">x</var>, <var title="">y</var>) on a <a href=#concept-path title=concept-path>path</a>, the user
- agent must check to see if the <a href=#concept-path title=concept-path>path</a> has any subpaths, and if it
- does not, then the user agent must create a new subpath with the point (<var title="">x</var>,
- <var title="">y</var>) as its first (and only) point, as if the <code title=dom-context-2d-moveTo><a href=#dom-context-2d-moveto>moveTo()</a></code> method had been called.</p>
+ agent must check to see if the <a href=#concept-path title=concept-path>path</a> has its <a href=#need-new-subpath>need new
+ subpath</a> flag set. If it does, the user agent must create a new subpath with the point (<var title="">x</var>, <var title="">y</var>) as its first (and only) point, as if the <code title=dom-context-2d-moveTo><a href=#dom-context-2d-moveto>moveTo()</a></code> method had been called, and must then unset the
+ <a href=#concept-path title=concept-path>path</a>'s <a href=#need-new-subpath>need new subpath</a> flag.</p>
<p>The <dfn id=dom-context-2d-closepath title=dom-context-2d-closePath><code>closePath()</code></dfn> method must do nothing
@@ -56711,14 +56716,10 @@
</li>
- <li><p>Let (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) be the last point in the last subpath of <var title="">merged
- path</var>.</li>
-
<li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path>Path</a></code>
object.</li>
- <li><p>Create a new subpath in the <code><a href=#path>Path</a></code> object with (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) as the only point
- in the subpath.</li>
+ <li><p>Set the <code><a href=#path>Path</a></code> object's <a href=#need-new-subpath>need new subpath</a> flag.</li>
</ol><hr><p>The <dfn id=dom-path-withdata title=dom-Path-withdata><code>Path(<var title="">d</var>)</code></dfn> constructor
must run the following steps:</p>
@@ -56862,15 +56863,10 @@
</li>
-<!--CLEANUP-->
- <li><p>Let (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) be the last point in the last subpath of <var title="">merged path</var>.</li>
-
<li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path>Path</a></code>
object.</li>
-<!--CLEANUP-->
- <li><p>Create a new subpath in the <code><a href=#path>Path</a></code> object with (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) as the only point in
- the subpath.</li>
+ <li><p>Set the <code><a href=#path>Path</a></code> object's <a href=#need-new-subpath>need new subpath</a> flag.</li>
</ol><p>When one of the <code title=dom-path-addText><a href=#dom-path-addtext>addText()</a></code> and <code title=dom-path-addPathByStrokingText><a href=#dom-path-addpathbystrokingtext>addPathByStrokingText()</a></code> variants that take as
argument a <code><a href=#path>Path</a></code> object is invoked, the method must run the following algorithm:</p>
@@ -56977,14 +56973,9 @@
</li>
- <li><p>Let (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) be the last point in the last subpath of <var title="">merged
- path</var>.</li>
-
<li><p>Add all the subpaths in <var title="">merged path</var> to <var title="">target</var>.</li>
-<!--CLEANUP-->
- <li><p>Create a new subpath in <var title="">target</var> with (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) as the only point in
- the subpath.</li>
+ <li><p>Set the <code><a href=#path>Path</a></code> object's <a href=#need-new-subpath>need new subpath</a> flag.</li>
</ol></div>
Modified: source
===================================================================
--- source 2014-03-12 22:21:34 UTC (rev 8540)
+++ source 2014-03-12 22:34:28 UTC (rev 8541)
@@ -62198,6 +62198,11 @@
closed subpath is one where the last point of the subpath is connected to the first point of the
subpath by a straight line. Subpaths with only one point are ignored when painting the path.</p>
+ <p><span data-x="concept-path">Paths</span> have a <dfn>need new subpath</dfn> flag. When this
+ flag is set, certain APIs create a new subpath rather than extending the previous one. When a
+ <span data-x="concept-path">path</span> is created, its <span>need new subpath</span> flag must be
+ set.</p>
+
<p>When an object implementing the <code>CanvasPathMethods</code> interface is created, its <span
data-x="concept-path">path</span> must be initialized to zero subpaths.</p>
@@ -62626,10 +62631,11 @@
<p>When the user agent is to <dfn>ensure there is a subpath</dfn> for a coordinate (<var
data-x="">x</var>, <var data-x="">y</var>) on a <span data-x="concept-path">path</span>, the user
- agent must check to see if the <span data-x="concept-path">path</span> has any subpaths, and if it
- does not, then the user agent must create a new subpath with the point (<var data-x="">x</var>,
- <var data-x="">y</var>) as its first (and only) point, as if the <code
- data-x="dom-context-2d-moveTo">moveTo()</code> method had been called.</p>
+ agent must check to see if the <span data-x="concept-path">path</span> has its <span>need new
+ subpath</span> flag set. If it does, the user agent must create a new subpath with the point (<var
+ data-x="">x</var>, <var data-x="">y</var>) as its first (and only) point, as if the <code
+ data-x="dom-context-2d-moveTo">moveTo()</code> method had been called, and must then unset the
+ <span data-x="concept-path">path</span>'s <span>need new subpath</span> flag.</p>
<p>The <dfn data-x="dom-context-2d-closePath"><code>closePath()</code></dfn> method must do nothing
@@ -62931,16 +62937,10 @@
</li>
- <li><p>Let (<var data-x="">x<sub data-x="">final</sub></var>, <var data-x="">y<sub
- data-x="">final</sub></var>) be the last point in the last subpath of <var data-x="">merged
- path</var>.</p></li>
-
<li><p>Add all the subpaths in <var data-x="">merged path</var> to the <code>Path</code>
object.</p></li>
- <li><p>Create a new subpath in the <code>Path</code> object with (<var data-x="">x<sub
- data-x="">final</sub></var>, <var data-x="">y<sub data-x="">final</sub></var>) as the only point
- in the subpath.</p></li>
+ <li><p>Set the <code>Path</code> object's <span>need new subpath</span> flag.</p></li>
</ol>
@@ -63124,17 +63124,10 @@
</li>
-<!--CLEANUP-->
- <li><p>Let (<var data-x="">x<sub data-x="">final</sub></var>, <var data-x="">y<sub
- data-x="">final</sub></var>) be the last point in the last subpath of <var data-x="">merged path</var>.</p></li>
-
<li><p>Add all the subpaths in <var data-x="">merged path</var> to the <code>Path</code>
object.</p></li>
-<!--CLEANUP-->
- <li><p>Create a new subpath in the <code>Path</code> object with (<var data-x="">x<sub
- data-x="">final</sub></var>, <var data-x="">y<sub data-x="">final</sub></var>) as the only point in
- the subpath.</p></li>
+ <li><p>Set the <code>Path</code> object's <span>need new subpath</span> flag.</p></li>
</ol>
@@ -63270,17 +63263,10 @@
</li>
- <li><p>Let (<var data-x="">x<sub data-x="">final</sub></var>, <var data-x="">y<sub
- data-x="">final</sub></var>) be the last point in the last subpath of <var data-x="">merged
- path</var>.</p></li>
-
<li><p>Add all the subpaths in <var data-x="">merged path</var> to <var
data-x="">target</var>.</p></li>
-<!--CLEANUP-->
- <li><p>Create a new subpath in <var data-x="">target</var> with (<var data-x="">x<sub
- data-x="">final</sub></var>, <var data-x="">y<sub data-x="">final</sub></var>) as the only point in
- the subpath.</p></li>
+ <li><p>Set the <code>Path</code> object's <span>need new subpath</span> flag.</p></li>
</ol>
More information about the Commit-Watchers
mailing list