[html5] r8563 - [giow] (1) Rename Path to Path2D Affected topics: Canvas
whatwg at whatwg.org
whatwg at whatwg.org
Wed Apr 2 17:07:54 PDT 2014
Author: ianh
Date: 2014-04-02 17:07:44 -0700 (Wed, 02 Apr 2014)
New Revision: 8563
Modified:
complete.html
index
source
Log:
[giow] (1) Rename Path to Path2D
Affected topics: Canvas
Modified: complete.html
===================================================================
--- complete.html 2014-04-02 22:47:04 UTC (rev 8562)
+++ complete.html 2014-04-03 00:07:44 UTC (rev 8563)
@@ -298,7 +298,7 @@
<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 2 April 2014</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 3 April 2014</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -866,7 +866,7 @@
<li><a href=#line-styles><span class=secno>4.12.4.2.4 </span>Line styles</a></li>
<li><a href=#text-styles><span class=secno>4.12.4.2.5 </span>Text styles</a></li>
<li><a href=#building-paths><span class=secno>4.12.4.2.6 </span>Building paths</a></li>
- <li><a href=#path-objects><span class=secno>4.12.4.2.7 </span><code>Path</code> objects</a></li>
+ <li><a href=#path2d-objects><span class=secno>4.12.4.2.7 </span><code>Path2D</code> objects</a></li>
<li><a href=#transformations><span class=secno>4.12.4.2.8 </span>Transformations</a></li>
<li><a href=#image-sources-for-2d-rendering-contexts><span class=secno>4.12.4.2.9 </span>Image sources for 2D rendering contexts</a></li>
<li><a href=#fill-and-stroke-styles><span class=secno>4.12.4.2.10 </span>Fill and stroke styles</a></li>
@@ -54678,22 +54678,22 @@
// path API (see also <a href=#canvaspathmethods>CanvasPathMethods</a>)
void <a href=#dom-context-2d-beginpath title=dom-context-2d-beginPath>beginPath</a>();
void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>(optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
- void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>(<a href=#path>Path</a> path, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
+ void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>(<a href=#path2d>Path2D</a> path, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
void <a href=#dom-context-2d-stroke title=dom-context-2d-stroke>stroke</a>();
- void <a href=#dom-context-2d-stroke title=dom-context-2d-stroke>stroke</a>(<a href=#path>Path</a> path);
+ void <a href=#dom-context-2d-stroke title=dom-context-2d-stroke>stroke</a>(<a href=#path2d>Path2D</a> path);
void <a href=#dom-context-2d-drawsystemfocusring title=dom-context-2d-drawSystemFocusRing>drawSystemFocusRing</a>(<a href=#element>Element</a> element);
- void <a href=#dom-context-2d-drawsystemfocusring title=dom-context-2d-drawSystemFocusRing>drawSystemFocusRing</a>(<a href=#path>Path</a> path, <a href=#element>Element</a> element);
+ void <a href=#dom-context-2d-drawsystemfocusring title=dom-context-2d-drawSystemFocusRing>drawSystemFocusRing</a>(<a href=#path2d>Path2D</a> path, <a href=#element>Element</a> element);
boolean <a href=#dom-context-2d-drawcustomfocusring title=dom-context-2d-drawCustomFocusRing>drawCustomFocusRing</a>(<a href=#element>Element</a> element);
- boolean <a href=#dom-context-2d-drawcustomfocusring title=dom-context-2d-drawCustomFocusRing>drawCustomFocusRing</a>(<a href=#path>Path</a> path, <a href=#element>Element</a> element);
+ boolean <a href=#dom-context-2d-drawcustomfocusring title=dom-context-2d-drawCustomFocusRing>drawCustomFocusRing</a>(<a href=#path2d>Path2D</a> path, <a href=#element>Element</a> element);
void <a href=#dom-context-2d-scrollpathintoview title=dom-context-2d-scrollPathIntoView>scrollPathIntoView</a>();
- void <a href=#dom-context-2d-scrollpathintoview title=dom-context-2d-scrollPathIntoView>scrollPathIntoView</a>(<a href=#path>Path</a> path);
+ void <a href=#dom-context-2d-scrollpathintoview title=dom-context-2d-scrollPathIntoView>scrollPathIntoView</a>(<a href=#path2d>Path2D</a> path);
void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
- void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(<a href=#path>Path</a> path, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
+ void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(<a href=#path2d>Path2D</a> path, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
void <a href=#dom-context-2d-resetclip title=dom-context-2d-resetClip>resetClip</a>();
boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(unrestricted double x, unrestricted double y, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
- boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(<a href=#path>Path</a> path, unrestricted double x, unrestricted double y, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
+ boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(<a href=#path2d>Path2D</a> path, unrestricted double x, unrestricted double y, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
boolean <a href=#dom-context-2d-ispointinstroke title=dom-context-2d-isPointInStroke>isPointInStroke</a>(unrestricted double x, unrestricted double y);
- boolean <a href=#dom-context-2d-ispointinstroke title=dom-context-2d-isPointInStroke>isPointInStroke</a>(<a href=#path>Path</a> path, unrestricted double x, unrestricted double y);
+ boolean <a href=#dom-context-2d-ispointinstroke title=dom-context-2d-isPointInStroke>isPointInStroke</a>(<a href=#path2d>Path2D</a> path, unrestricted double x, unrestricted double y);
// text (see also the <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> interface)
void <a href=#dom-context-2d-filltext title=dom-context-2d-fillText>fillText</a>(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
@@ -54788,7 +54788,7 @@
};
dictionary <dfn id=hitregionoptions>HitRegionOptions</dfn> {
- <a href=#path>Path</a>? <a href=#dom-hitregionoptions-path title=dom-HitRegionOptions-path>path</a> = null;
+ <a href=#path2d>Path2D</a>? <a href=#dom-hitregionoptions-path title=dom-HitRegionOptions-path>path</a> = null;
<a href=#canvasfillrule>CanvasFillRule</a> <a href=#dom-hitregionoptions-fillrule title=dom-HitRegionOptions-fillRule>fillRule</a> = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>";
<!-- <span>SVGMatrix</span>? <span title="dom-HitRegionOptions-transform">transform</span> = null;
--> DOMString <a href=#dom-hitregionoptions-id title=dom-HitRegionOptions-id>id</a> = ""; <!-- "" is converted to null internally by addHitRegion() -->
@@ -54814,19 +54814,19 @@
interface <dfn id=drawingstyle>DrawingStyle</dfn> { };
<a href=#drawingstyle>DrawingStyle</a> implements <a href=#canvasdrawingstyles>CanvasDrawingStyles</a>;
-[<a href=#dom-path title=dom-Path>Constructor</a>,
- <a href=#dom-path-copy title=dom-Path-copy>Constructor</a>(<a href=#path>Path</a> path),
- <a href=#dom-path-merge title=dom-Path-merge>Constructor</a>(<a href=#path>Path</a>[] paths, <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>"),
- <a href=#dom-path-withdata title=dom-Path-withdata>Constructor</a>(DOMString d), Exposed=Window,Worker]
-interface <dfn id=path>Path</dfn> {
- void <a href=#dom-path-addpath title=dom-path-addPath>addPath</a>(<a href=#path>Path</a> path, <a href=#svgmatrix>SVGMatrix</a>? transformation);
- void <a href=#dom-path-addpathbystrokingpath title=dom-path-addPathByStrokingPath>addPathByStrokingPath</a>(<a href=#path>Path</a> path, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation);
- void <a href=#dom-path-addtext title=dom-path-addText>addText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
- void <a href=#dom-path-addpathbystrokingtext title=dom-path-addPathByStrokingText>addPathByStrokingText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
- void <a href=#dom-path-addtext title=dom-path-addText>addText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, <a href=#path>Path</a> path, optional unrestricted double maxWidth);
- void <a href=#dom-path-addpathbystrokingtext title=dom-path-addPathByStrokingText>addPathByStrokingText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, <a href=#path>Path</a> path, optional unrestricted double maxWidth);
+[<a href=#dom-path2d title=dom-Path2D>Constructor</a>,
+ <a href=#dom-path2d-copy title=dom-Path2D-copy>Constructor</a>(<a href=#path2d>Path2D</a> path),
+ <a href=#dom-path2d-merge title=dom-Path2D-merge>Constructor</a>(<a href=#path2d>Path2D</a>[] paths, <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>"),
+ <a href=#dom-path2d-withdata title=dom-Path2D-withdata>Constructor</a>(DOMString d), Exposed=Window,Worker]
+interface <dfn id=path2d>Path2D</dfn> {
+ void <a href=#dom-path2d-addpath title=dom-Path2D-addPath>addPath</a>(<a href=#path2d>Path2D</a> path, <a href=#svgmatrix>SVGMatrix</a>? transformation);
+ void <a href=#dom-path2d-addpathbystrokingpath title=dom-Path2D-addPathByStrokingPath>addPathByStrokingPath</a>(<a href=#path2d>Path2D</a> path, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation);
+ void <a href=#dom-path2d-addtext title=dom-Path2D-addText>addText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
+ void <a href=#dom-path2d-addpathbystrokingtext title=dom-Path2D-addPathByStrokingText>addPathByStrokingText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
+ void <a href=#dom-path2d-addtext title=dom-Path2D-addText>addText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, <a href=#path2d>Path2D</a> path, optional unrestricted double maxWidth);
+ void <a href=#dom-path2d-addpathbystrokingtext title=dom-Path2D-addPathByStrokingText>addPathByStrokingText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, <a href=#path2d>Path2D</a> path, optional unrestricted double maxWidth);
};
-<a href=#path>Path</a> implements <a href=#canvaspathmethods>CanvasPathMethods</a>;</pre>
+<a href=#path2d>Path2D</a> implements <a href=#canvaspathmethods>CanvasPathMethods</a>;</pre>
<!-- ARC-ORDER note (see above):
some demos rely on the precise order of the arc() and arcTo()
@@ -55318,12 +55318,14 @@
</div>
+<!--CLEANUP--><!-- anything involving Path2D -->
+
<h6 id=drawingstyle-objects><span class=secno>4.12.4.2.3 </span><code><a href=#drawingstyle>DrawingStyle</a></code> objects</h6>
<p>All the line styles (line width, caps, joins, and dash patterns) and text styles (fonts)
described in the next two sections apply to <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> objects and to
<code><a href=#drawingstyle>DrawingStyle</a></code> objects. This section defines the constructor used to obtain a
- <code><a href=#drawingstyle>DrawingStyle</a></code> object. This object is then used by methods on <code><a href=#path>Path</a></code> objects
+ <code><a href=#drawingstyle>DrawingStyle</a></code> object. This object is then used by methods on <code><a href=#path2d>Path2D</a></code> objects
to control how text and paths are rasterised and stroked.</p>
<dl class=domintro><dt><var title="">styles</var> = new <code title=dom-DrawingStyle><a href=#dom-drawingstyle>DrawingStyle</a></code>( [ <var title="">element</var> ] )</dt>
@@ -56683,38 +56685,38 @@
- <h6 id=path-objects><span class=secno>4.12.4.2.7 </span><code><a href=#path>Path</a></code> objects</h6>
+ <h6 id=path2d-objects><span class=secno>4.12.4.2.7 </span><code><a href=#path2d>Path2D</a></code> objects</h6>
- <p><code><a href=#path>Path</a></code> objects can be used to declare paths that are then later used on
+ <p><code><a href=#path2d>Path2D</a></code> objects can be used to declare paths that are then later used on
<code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> objects. In addition to many of the APIs described in
- earlier sections, <code><a href=#path>Path</a></code> objects have methods to combine paths, and to add text to
+ earlier sections, <code><a href=#path2d>Path2D</a></code> objects have methods to combine paths, and to add text to
paths.</p>
- <dl class=domintro><dt><var title="">path</var> = new <code title=dom-Path><a href=#dom-path>Path</a></code>()</dt>
+ <dl class=domintro><dt><var title="">path</var> = new <code title=dom-Path2D><a href=#dom-path2d>Path2D</a></code>()</dt>
<dd>
- <p>Creates a new empty <code><a href=#path>Path</a></code> object.</p>
+ <p>Creates a new empty <code><a href=#path2d>Path2D</a></code> object.</p>
</dd>
- <dt><var title="">path</var> = new <code title=dom-Path-copy><a href=#dom-path-copy>Path</a></code>(<var title="">path</var>)</dt>
+ <dt><var title="">path</var> = new <code title=dom-Path2D-copy><a href=#dom-path2d-copy>Path2D</a></code>(<var title="">path</var>)</dt>
<dd>
- <p>Creates a new <code><a href=#path>Path</a></code> object that is a copy of the argument.</p>
+ <p>Creates a new <code><a href=#path2d>Path2D</a></code> object that is a copy of the argument.</p>
</dd>
- <dt><var title="">path</var> = new <code title=dom-Path-merge><a href=#dom-path-merge>Path</a></code>(<var title="">paths</var> [, <var title="">fillRule</var> ] )</dt>
+ <dt><var title="">path</var> = new <code title=dom-Path2D-merge><a href=#dom-path2d-merge>Path2D</a></code>(<var title="">paths</var> [, <var title="">fillRule</var> ] )</dt>
<dd>
- <p>Creates a new <code><a href=#path>Path</a></code> object that describes a path that outlines the given <var title="">paths</var>, using the given fill rule.</p>
+ <p>Creates a new <code><a href=#path2d>Path2D</a></code> object that describes a path that outlines the given <var title="">paths</var>, using the given fill rule.</p>
</dd>
- <dt><var title="">path</var> = new <code title=dom-Path-withdata><a href=#dom-path-withdata>Path</a></code>(<var title="">d</var>)</dt>
+ <dt><var title="">path</var> = new <code title=dom-Path2D-withdata><a href=#dom-path2d-withdata>Path2D</a></code>(<var title="">d</var>)</dt>
<dd>
@@ -56722,8 +56724,8 @@
</dd>
- <dt><var title="">path</var> . <code title=dom-path-addPath><a href=#dom-path-addpath>addPath</a></code>(<var title="">path</var>, <var title="">transform</var>)</dt>
- <dt><var title="">path</var> . <code title=dom-path-addPathByStrokingPath><a href=#dom-path-addpathbystrokingpath>addPathByStrokingPath</a></code>(<var title="">path</var>, <var title="">styles</var>, <var title="">transform</var>)</dt>
+ <dt><var title="">path</var> . <code title=dom-Path2D-addPath><a href=#dom-path2d-addpath>addPath</a></code>(<var title="">path</var>, <var title="">transform</var>)</dt>
+ <dt><var title="">path</var> . <code title=dom-Path2D-addPathByStrokingPath><a href=#dom-path2d-addpathbystrokingpath>addPathByStrokingPath</a></code>(<var title="">path</var>, <var title="">styles</var>, <var title="">transform</var>)</dt>
<dd>
@@ -56734,10 +56736,10 @@
</dd>
- <dt><var title="">path</var> . <code title=dom-path-addText><a href=#dom-path-addtext>addText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">x</var>, <var title="">y</var> [, <var title="">maxWidth</var> ] )</dt>
- <dt><var title="">path</var> . <code title=dom-path-addText><a href=#dom-path-addtext>addText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">path</var> [, <var title="">maxWidth</var> ] )</dt>
- <dt><var title="">path</var> . <code title=dom-path-addPathByStrokingText><a href=#dom-path-addpathbystrokingtext>addPathByStrokingText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">x</var>, <var title="">y</var> [, <var title="">maxWidth</var> ] )</dt>
- <dt><var title="">path</var> . <code title=dom-path-addPathByStrokingText><a href=#dom-path-addpathbystrokingtext>addPathByStrokingText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">path</var> [, <var title="">maxWidth</var> ] )</dt>
+ <dt><var title="">path</var> . <code title=dom-Path2D-addText><a href=#dom-path2d-addtext>addText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">x</var>, <var title="">y</var> [, <var title="">maxWidth</var> ] )</dt>
+ <dt><var title="">path</var> . <code title=dom-Path2D-addText><a href=#dom-path2d-addtext>addText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">path</var> [, <var title="">maxWidth</var> ] )</dt>
+ <dt><var title="">path</var> . <code title=dom-Path2D-addPathByStrokingText><a href=#dom-path2d-addpathbystrokingtext>addPathByStrokingText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">x</var>, <var title="">y</var> [, <var title="">maxWidth</var> ] )</dt>
+ <dt><var title="">path</var> . <code title=dom-Path2D-addPathByStrokingText><a href=#dom-path2d-addpathbystrokingtext>addPathByStrokingText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">path</var> [, <var title="">maxWidth</var> ] )</dt>
<dd>
@@ -56753,14 +56755,14 @@
</dl><div class=impl>
- <p>The <dfn id=dom-path title=dom-Path><code>Path()</code></dfn> constructor, when invoked, must return a
- newly created <code><a href=#path>Path</a></code> object.</p>
+ <p>The <dfn id=dom-path2d title=dom-Path2D><code>Path()</code></dfn> constructor, when invoked, must return a
+ newly created <code><a href=#path2d>Path2D</a></code> object.</p>
- <hr><p>The <dfn id=dom-path-copy title=dom-Path-copy><code>Path(<var title="">path</var>)</code></dfn> constructor,
- when invoked, must return a newly created <code><a href=#path>Path</a></code> object, to which the subpaths of the
+ <hr><p>The <dfn id=dom-path2d-copy title=dom-Path2D-copy><code>Path(<var title="">path</var>)</code></dfn> constructor,
+ when invoked, must return a newly created <code><a href=#path2d>Path2D</a></code> object, to which the subpaths of the
argument are added. (In other words, it returns a copy of the argument.)</p>
- <hr><p>The <dfn id=dom-path-merge title=dom-Path-merge><code>Path(<var title="">paths</var>, <var title="">fillRule</var>)</code></dfn> constructor, when invoked, must run the following
+ <hr><p>The <dfn id=dom-path2d-merge title=dom-Path2D-merge><code>Path(<var title="">paths</var>, <var title="">fillRule</var>)</code></dfn> constructor, when invoked, must run the following
steps:</p>
<ol><li>
@@ -56801,12 +56803,12 @@
</li>
- <li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path>Path</a></code>
+ <li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path2d>Path2D</a></code>
object.</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>
+ <li><p>Set the <code><a href=#path2d>Path2D</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
+ </ol><hr><p>The <dfn id=dom-path2d-withdata title=dom-Path2D-withdata><code>Path(<var title="">d</var>)</code></dfn> constructor
must run the following steps:</p>
<ol><li>
@@ -56822,16 +56824,16 @@
<li><p>Let (<var title="">x</var>, <var title="">y</var>) be the last point in the SVG
path.</li>
- <li><p>Create a new <code><a href=#path>Path</a></code> object and add all the subpaths in the SVG path, if any, to
- that <code><a href=#path>Path</a></code> object. </p>
+ <li><p>Create a new <code><a href=#path2d>Path2D</a></code> object and add all the subpaths in the SVG path, if any, to
+ that <code><a href=#path2d>Path2D</a></code> object. </p>
- <li><p>Create a new subpath in the <code><a href=#path>Path</a></code> object with (<var title="">x</var>, <var title="">y</var>) as the only point in the subpath.</li>
+ <li><p>Create a new subpath in the <code><a href=#path2d>Path2D</a></code> object with (<var title="">x</var>, <var title="">y</var>) as the only point in the subpath.</li>
- <li><p>Return the <code><a href=#path>Path</a></code> object as the constructed object.</li>
+ <li><p>Return the <code><a href=#path2d>Path2D</a></code> object as the constructed object.</li>
- </ol><hr><p>The <dfn id=dom-path-addpath title=dom-path-addPath><code>addPath(<var title="">b</var>, <var title="">transform</var>)</code></dfn> method, when invoked on a <code><a href=#path>Path</a></code> object <var title="">a</var>, must run the following steps:</p>
+ </ol><hr><p>The <dfn id=dom-path2d-addpath title=dom-Path2D-addPath><code>addPath(<var title="">b</var>, <var title="">transform</var>)</code></dfn> method, when invoked on a <code><a href=#path2d>Path2D</a></code> object <var title="">a</var>, must run the following steps:</p>
- <ol><li><p>If the <code><a href=#path>Path</a></code> object <var title="">b</var> has no subpaths, abort these
+ <ol><li><p>If the <code><a href=#path2d>Path2D</a></code> object <var title="">b</var> has no subpaths, abort these
steps.</li>
<li><p>Create a copy of all the subpaths in <var title="">b</var>. Let this copy be known as <var title="">c</var>.</li>
@@ -56846,11 +56848,11 @@
<li><p>Create a new subpath in <var title="">a</var> with (<var title="">x</var>, <var title="">y</var>) as the only point in the subpath.</li>
- </ol><hr><p>The <dfn id=dom-path-addpathbystrokingpath title=dom-path-addPathByStrokingPath><code>addPathByStrokingPath(<var title="">b</var>, <var title="">styles</var>, <var title="">transform</var>)</code></dfn> method,
- when invoked on a <code><a href=#path>Path</a></code> object <var title="">a</var>, must run the following
+ </ol><hr><p>The <dfn id=dom-path2d-addpathbystrokingpath title=dom-Path2D-addPathByStrokingPath><code>addPathByStrokingPath(<var title="">b</var>, <var title="">styles</var>, <var title="">transform</var>)</code></dfn> method,
+ when invoked on a <code><a href=#path2d>Path2D</a></code> object <var title="">a</var>, must run the following
steps:</p>
- <ol><li><p>If the <code><a href=#path>Path</a></code> object <var title="">b</var> has no subpaths, abort these
+ <ol><li><p>If the <code><a href=#path2d>Path2D</a></code> object <var title="">b</var> has no subpaths, abort these
steps.</li>
<li><p>Create a copy of all the subpaths in <var title="">b</var>. Let this copy be known as <var title="">c</var>.</li>
@@ -56869,12 +56871,12 @@
<li><p>Create a new subpath in <var title="">a</var> with (<var title="">x</var>, <var title="">y</var>) as the only point in the subpath.</li>
- </ol><hr><p>The <dfn id=dom-path-addtext title=dom-path-addText><code>addText()</code></dfn> and <dfn id=dom-path-addpathbystrokingtext title=dom-path-addPathByStrokingText><code>addPathByStrokingText()</code></dfn> methods each
+ </ol><hr><p>The <dfn id=dom-path2d-addtext title=dom-Path2D-addText><code>addText()</code></dfn> and <dfn id=dom-path2d-addpathbystrokingtext title=dom-Path2D-addPathByStrokingText><code>addPathByStrokingText()</code></dfn> methods each
come in two variants: one rendering text at a given coordinate, and one rendering text along a
given path. In both cases, the methods take a <code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code> object argument for
the text and (if appropriate) line styles to use, an <code><a href=#svgmatrix>SVGMatrix</a></code> object <var title="">transform</var> (which can be null), and a maximum width can optionally be provided.</p>
- <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
+ <p>When one of the <code title=dom-Path2D-addText><a href=#dom-path2d-addtext>addText()</a></code> and <code title=dom-Path2D-addPathByStrokingText><a href=#dom-path2d-addpathbystrokingtext>addPathByStrokingText()</a></code> variants that take as
argument an (<var title="">x</var>, <var title="">y</var>) coordinate is invoked, the method must
run the following algorithm:</p>
@@ -56895,7 +56897,7 @@
transformation matrix <var title="">transform</var>, if it is not null.</li>
<!--CLEANUP-->
- <li><p>If the method is <code title=dom-path-addPathByStrokingText><a href=#dom-path-addpathbystrokingtext>addPathByStrokingText()</a></code>, replace <var title="">glyph paths</var> by the result of <a href=#trace-a-path title="trace a path">tracing</a> each <a href=#concept-path title=concept-path>path</a> in <var title="">glyph paths</var>, using the <code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code> object argument for the
+ <li><p>If the method is <code title=dom-Path2D-addPathByStrokingText><a href=#dom-path2d-addpathbystrokingtext>addPathByStrokingText()</a></code>, replace <var title="">glyph paths</var> by the result of <a href=#trace-a-path title="trace a path">tracing</a> each <a href=#concept-path title=concept-path>path</a> in <var title="">glyph paths</var>, using the <code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code> object argument for the
line styles.</p>
<li id=mergeGlyphs>
@@ -56948,18 +56950,18 @@
</li>
- <li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path>Path</a></code>
+ <li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path2d>Path2D</a></code>
object.</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>
+ <li><p>Set the <code><a href=#path2d>Path2D</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>
+ </ol><p>When one of the <code title=dom-Path2D-addText><a href=#dom-path2d-addtext>addText()</a></code> and <code title=dom-Path2D-addPathByStrokingText><a href=#dom-path2d-addpathbystrokingtext>addPathByStrokingText()</a></code> variants that take as
+ argument a <code><a href=#path2d>Path2D</a></code> object is invoked, the method must run the following algorithm:</p>
- <ol><li><p>Let <var title="">target</var> be the <code><a href=#path>Path</a></code> object on which the method was
+ <ol><li><p>Let <var title="">target</var> be the <code><a href=#path2d>Path2D</a></code> object on which the method was
invoked.</li>
- <li><p>Let <var title="">path</var> be the <code><a href=#path>Path</a></code> object that was provided in the
+ <li><p>Let <var title="">path</var> be the <code><a href=#path2d>Path2D</a></code> object that was provided in the
method's arguments.</li>
<li><p>Run the <a href=#text-preparation-algorithm>text preparation algorithm</a>, passing it <var title="">text</var>, the
@@ -57031,7 +57033,7 @@
<li><p>Transform all the coordinates and lines in <var title="">glyph subpaths</var> by the
transformation matrix <var title="">transform</var>, if it is not null.</li>
- <li><p>If the method is <code title=dom-path-addPathByStrokingText><a href=#dom-path-addpathbystrokingtext>addPathByStrokingText()</a></code>, replace <var title="">glyph subpaths</var> by the result of <a href=#trace-a-path title="trace a path">tracing</a> <var title="">glyph subpaths</var>, using the <code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code> object argument for
+ <li><p>If the method is <code title=dom-Path2D-addPathByStrokingText><a href=#dom-path2d-addpathbystrokingtext>addPathByStrokingText()</a></code>, replace <var title="">glyph subpaths</var> by the result of <a href=#trace-a-path title="trace a path">tracing</a> <var title="">glyph subpaths</var>, using the <code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code> object argument for
the line styles.</p>
<li><p>Add all the subpaths in <var title="">glyph subpaths</var> to <var title="">transformed path list</var>.</li>
@@ -57060,7 +57062,7 @@
<li><p>Add all the subpaths in <var title="">merged path</var> to <var title="">target</var>.</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>
+ <li><p>Set the <code><a href=#path2d>Path2D</a></code> object's <a href=#need-new-subpath>need new subpath</a> flag.</li>
</ol></div>
@@ -57073,7 +57075,7 @@
initialized to the identity transform.</p>
<p>The transformation matrix is applied to coordinates when creating the <a href=#current-default-path>current default
- path</a>, and when painting text, shapes, and <code><a href=#path>Path</a></code> objects, on
+ path</a>, and when painting text, shapes, and <code><a href=#path2d>Path2D</a></code> objects, on
<code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> objects.</p> <!-- conformance criteria for actual drawing
are described in the various sections below -->
@@ -58180,12 +58182,12 @@
zero subpaths.</p>
<p>Where the following method definitions use the term <i>intended path</i>, it means the
- <code><a href=#path>Path</a></code> argument, if one was provided, or the <a href=#current-default-path>current default path</a>
+ <code><a href=#path2d>Path2D</a></code> argument, if one was provided, or the <a href=#current-default-path>current default path</a>
otherwise.</p>
- <p>When the intended path is a <code><a href=#path>Path</a></code> object, the coordinates and lines of its subpaths
+ <p>When the intended path is a <code><a href=#path2d>Path2D</a></code> object, the coordinates and lines of its subpaths
must be transformed according to the <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> object's <a href=#transformations title=dom-context-2d-transformation>current transformation matrix</a> when used by these
- methods (without affecting the <code><a href=#path>Path</a></code> object itself). When the intended path is the
+ methods (without affecting the <code><a href=#path2d>Path2D</a></code> object itself). When the intended path is the
<a href=#current-default-path>current default path</a>, it is not affected by the transform. (This is because
transformations already affect the <a href=#current-default-path>current default path</a> when it is constructed, so
applying it when it is painted as well would result in a double transformation.)</p>
@@ -58207,7 +58209,7 @@
if the intended path is the <a href=#current-default-path>current default path</a>.</p>
<p>Paths, when filled or stroked, must be painted without affecting the <a href=#current-default-path>current default
- path</a> or any <code><a href=#path>Path</a></code> objects, and must be subject to <a href=#shadows title=shadows>shadow
+ path</a> or any <code><a href=#path2d>Path2D</a></code> objects, and must be subject to <a href=#shadows title=shadows>shadow
effects</a>, <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, the <a href=#clipping-region>clipping
region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
operators</a>. (The effect of transformations is described above and varies based on which path
@@ -58647,7 +58649,7 @@
<dl><dt><dfn id=dom-hitregionoptions-path title=dom-HitRegionOptions-path><code>path</code></dfn> (default null)</dt>
- <dd>A <code><a href=#path>Path</a></code> object that describes the pixels that form part of the region. If this
+ <dd>A <code><a href=#path2d>Path2D</a></code> object that describes the pixels that form part of the region. If this
member is not provided or is set to null, the <a href=#current-default-path>current default path</a> is used
instead.</dd>
@@ -58890,6 +58892,8 @@
<li><p>Let <var title="">specified pixels</var> be the pixels contained in <var title="">source
path</var>, using the <a href=#fill-rule>fill rule</a> indicated by the <code title=dom-HitRegionOptions-fillRule><a href=#dom-hitregionoptions-fillrule>fillRule</a></code> member.</li>
+<!--XXX-->
+
<li><p>If the <var title="">arguments</var> object's <code title=dom-HitRegionOptions-id><a href=#dom-hitregionoptions-id>id</a></code> member is the empty string, let it be null
instead.</li>
@@ -103604,7 +103608,7 @@
<li><code><a href=#navigatorplugins>NavigatorPlugins</a></code>
<li><code><a href=#navigatorstorageutils>NavigatorStorageUtils</a></code>
<li><code><a href=#pagetransitionevent>PageTransitionEvent</a></code>
- <li><code><a href=#path>Path</a></code>
+ <li><code><a href=#path2d>Path2D</a></code>
<li><code><a href=#dom-plugin>Plugin</a></code>
<li><code><a href=#pluginarray>PluginArray</a></code>
<li><code><a href=#popstateevent>PopStateEvent</a></code>
Modified: index
===================================================================
--- index 2014-04-02 22:47:04 UTC (rev 8562)
+++ index 2014-04-03 00:07:44 UTC (rev 8563)
@@ -298,7 +298,7 @@
<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 2 April 2014</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 3 April 2014</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -866,7 +866,7 @@
<li><a href=#line-styles><span class=secno>4.12.4.2.4 </span>Line styles</a></li>
<li><a href=#text-styles><span class=secno>4.12.4.2.5 </span>Text styles</a></li>
<li><a href=#building-paths><span class=secno>4.12.4.2.6 </span>Building paths</a></li>
- <li><a href=#path-objects><span class=secno>4.12.4.2.7 </span><code>Path</code> objects</a></li>
+ <li><a href=#path2d-objects><span class=secno>4.12.4.2.7 </span><code>Path2D</code> objects</a></li>
<li><a href=#transformations><span class=secno>4.12.4.2.8 </span>Transformations</a></li>
<li><a href=#image-sources-for-2d-rendering-contexts><span class=secno>4.12.4.2.9 </span>Image sources for 2D rendering contexts</a></li>
<li><a href=#fill-and-stroke-styles><span class=secno>4.12.4.2.10 </span>Fill and stroke styles</a></li>
@@ -54678,22 +54678,22 @@
// path API (see also <a href=#canvaspathmethods>CanvasPathMethods</a>)
void <a href=#dom-context-2d-beginpath title=dom-context-2d-beginPath>beginPath</a>();
void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>(optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
- void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>(<a href=#path>Path</a> path, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
+ void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>(<a href=#path2d>Path2D</a> path, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
void <a href=#dom-context-2d-stroke title=dom-context-2d-stroke>stroke</a>();
- void <a href=#dom-context-2d-stroke title=dom-context-2d-stroke>stroke</a>(<a href=#path>Path</a> path);
+ void <a href=#dom-context-2d-stroke title=dom-context-2d-stroke>stroke</a>(<a href=#path2d>Path2D</a> path);
void <a href=#dom-context-2d-drawsystemfocusring title=dom-context-2d-drawSystemFocusRing>drawSystemFocusRing</a>(<a href=#element>Element</a> element);
- void <a href=#dom-context-2d-drawsystemfocusring title=dom-context-2d-drawSystemFocusRing>drawSystemFocusRing</a>(<a href=#path>Path</a> path, <a href=#element>Element</a> element);
+ void <a href=#dom-context-2d-drawsystemfocusring title=dom-context-2d-drawSystemFocusRing>drawSystemFocusRing</a>(<a href=#path2d>Path2D</a> path, <a href=#element>Element</a> element);
boolean <a href=#dom-context-2d-drawcustomfocusring title=dom-context-2d-drawCustomFocusRing>drawCustomFocusRing</a>(<a href=#element>Element</a> element);
- boolean <a href=#dom-context-2d-drawcustomfocusring title=dom-context-2d-drawCustomFocusRing>drawCustomFocusRing</a>(<a href=#path>Path</a> path, <a href=#element>Element</a> element);
+ boolean <a href=#dom-context-2d-drawcustomfocusring title=dom-context-2d-drawCustomFocusRing>drawCustomFocusRing</a>(<a href=#path2d>Path2D</a> path, <a href=#element>Element</a> element);
void <a href=#dom-context-2d-scrollpathintoview title=dom-context-2d-scrollPathIntoView>scrollPathIntoView</a>();
- void <a href=#dom-context-2d-scrollpathintoview title=dom-context-2d-scrollPathIntoView>scrollPathIntoView</a>(<a href=#path>Path</a> path);
+ void <a href=#dom-context-2d-scrollpathintoview title=dom-context-2d-scrollPathIntoView>scrollPathIntoView</a>(<a href=#path2d>Path2D</a> path);
void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
- void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(<a href=#path>Path</a> path, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
+ void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(<a href=#path2d>Path2D</a> path, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
void <a href=#dom-context-2d-resetclip title=dom-context-2d-resetClip>resetClip</a>();
boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(unrestricted double x, unrestricted double y, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
- boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(<a href=#path>Path</a> path, unrestricted double x, unrestricted double y, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
+ boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(<a href=#path2d>Path2D</a> path, unrestricted double x, unrestricted double y, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
boolean <a href=#dom-context-2d-ispointinstroke title=dom-context-2d-isPointInStroke>isPointInStroke</a>(unrestricted double x, unrestricted double y);
- boolean <a href=#dom-context-2d-ispointinstroke title=dom-context-2d-isPointInStroke>isPointInStroke</a>(<a href=#path>Path</a> path, unrestricted double x, unrestricted double y);
+ boolean <a href=#dom-context-2d-ispointinstroke title=dom-context-2d-isPointInStroke>isPointInStroke</a>(<a href=#path2d>Path2D</a> path, unrestricted double x, unrestricted double y);
// text (see also the <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> interface)
void <a href=#dom-context-2d-filltext title=dom-context-2d-fillText>fillText</a>(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
@@ -54788,7 +54788,7 @@
};
dictionary <dfn id=hitregionoptions>HitRegionOptions</dfn> {
- <a href=#path>Path</a>? <a href=#dom-hitregionoptions-path title=dom-HitRegionOptions-path>path</a> = null;
+ <a href=#path2d>Path2D</a>? <a href=#dom-hitregionoptions-path title=dom-HitRegionOptions-path>path</a> = null;
<a href=#canvasfillrule>CanvasFillRule</a> <a href=#dom-hitregionoptions-fillrule title=dom-HitRegionOptions-fillRule>fillRule</a> = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>";
<!-- <span>SVGMatrix</span>? <span title="dom-HitRegionOptions-transform">transform</span> = null;
--> DOMString <a href=#dom-hitregionoptions-id title=dom-HitRegionOptions-id>id</a> = ""; <!-- "" is converted to null internally by addHitRegion() -->
@@ -54814,19 +54814,19 @@
interface <dfn id=drawingstyle>DrawingStyle</dfn> { };
<a href=#drawingstyle>DrawingStyle</a> implements <a href=#canvasdrawingstyles>CanvasDrawingStyles</a>;
-[<a href=#dom-path title=dom-Path>Constructor</a>,
- <a href=#dom-path-copy title=dom-Path-copy>Constructor</a>(<a href=#path>Path</a> path),
- <a href=#dom-path-merge title=dom-Path-merge>Constructor</a>(<a href=#path>Path</a>[] paths, <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>"),
- <a href=#dom-path-withdata title=dom-Path-withdata>Constructor</a>(DOMString d), Exposed=Window,Worker]
-interface <dfn id=path>Path</dfn> {
- void <a href=#dom-path-addpath title=dom-path-addPath>addPath</a>(<a href=#path>Path</a> path, <a href=#svgmatrix>SVGMatrix</a>? transformation);
- void <a href=#dom-path-addpathbystrokingpath title=dom-path-addPathByStrokingPath>addPathByStrokingPath</a>(<a href=#path>Path</a> path, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation);
- void <a href=#dom-path-addtext title=dom-path-addText>addText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
- void <a href=#dom-path-addpathbystrokingtext title=dom-path-addPathByStrokingText>addPathByStrokingText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
- void <a href=#dom-path-addtext title=dom-path-addText>addText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, <a href=#path>Path</a> path, optional unrestricted double maxWidth);
- void <a href=#dom-path-addpathbystrokingtext title=dom-path-addPathByStrokingText>addPathByStrokingText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, <a href=#path>Path</a> path, optional unrestricted double maxWidth);
+[<a href=#dom-path2d title=dom-Path2D>Constructor</a>,
+ <a href=#dom-path2d-copy title=dom-Path2D-copy>Constructor</a>(<a href=#path2d>Path2D</a> path),
+ <a href=#dom-path2d-merge title=dom-Path2D-merge>Constructor</a>(<a href=#path2d>Path2D</a>[] paths, <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>"),
+ <a href=#dom-path2d-withdata title=dom-Path2D-withdata>Constructor</a>(DOMString d), Exposed=Window,Worker]
+interface <dfn id=path2d>Path2D</dfn> {
+ void <a href=#dom-path2d-addpath title=dom-Path2D-addPath>addPath</a>(<a href=#path2d>Path2D</a> path, <a href=#svgmatrix>SVGMatrix</a>? transformation);
+ void <a href=#dom-path2d-addpathbystrokingpath title=dom-Path2D-addPathByStrokingPath>addPathByStrokingPath</a>(<a href=#path2d>Path2D</a> path, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation);
+ void <a href=#dom-path2d-addtext title=dom-Path2D-addText>addText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
+ void <a href=#dom-path2d-addpathbystrokingtext title=dom-Path2D-addPathByStrokingText>addPathByStrokingText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
+ void <a href=#dom-path2d-addtext title=dom-Path2D-addText>addText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, <a href=#path2d>Path2D</a> path, optional unrestricted double maxWidth);
+ void <a href=#dom-path2d-addpathbystrokingtext title=dom-Path2D-addPathByStrokingText>addPathByStrokingText</a>(DOMString text, <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> styles, <a href=#svgmatrix>SVGMatrix</a>? transformation, <a href=#path2d>Path2D</a> path, optional unrestricted double maxWidth);
};
-<a href=#path>Path</a> implements <a href=#canvaspathmethods>CanvasPathMethods</a>;</pre>
+<a href=#path2d>Path2D</a> implements <a href=#canvaspathmethods>CanvasPathMethods</a>;</pre>
<!-- ARC-ORDER note (see above):
some demos rely on the precise order of the arc() and arcTo()
@@ -55318,12 +55318,14 @@
</div>
+<!--CLEANUP--><!-- anything involving Path2D -->
+
<h6 id=drawingstyle-objects><span class=secno>4.12.4.2.3 </span><code><a href=#drawingstyle>DrawingStyle</a></code> objects</h6>
<p>All the line styles (line width, caps, joins, and dash patterns) and text styles (fonts)
described in the next two sections apply to <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> objects and to
<code><a href=#drawingstyle>DrawingStyle</a></code> objects. This section defines the constructor used to obtain a
- <code><a href=#drawingstyle>DrawingStyle</a></code> object. This object is then used by methods on <code><a href=#path>Path</a></code> objects
+ <code><a href=#drawingstyle>DrawingStyle</a></code> object. This object is then used by methods on <code><a href=#path2d>Path2D</a></code> objects
to control how text and paths are rasterised and stroked.</p>
<dl class=domintro><dt><var title="">styles</var> = new <code title=dom-DrawingStyle><a href=#dom-drawingstyle>DrawingStyle</a></code>( [ <var title="">element</var> ] )</dt>
@@ -56683,38 +56685,38 @@
- <h6 id=path-objects><span class=secno>4.12.4.2.7 </span><code><a href=#path>Path</a></code> objects</h6>
+ <h6 id=path2d-objects><span class=secno>4.12.4.2.7 </span><code><a href=#path2d>Path2D</a></code> objects</h6>
- <p><code><a href=#path>Path</a></code> objects can be used to declare paths that are then later used on
+ <p><code><a href=#path2d>Path2D</a></code> objects can be used to declare paths that are then later used on
<code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> objects. In addition to many of the APIs described in
- earlier sections, <code><a href=#path>Path</a></code> objects have methods to combine paths, and to add text to
+ earlier sections, <code><a href=#path2d>Path2D</a></code> objects have methods to combine paths, and to add text to
paths.</p>
- <dl class=domintro><dt><var title="">path</var> = new <code title=dom-Path><a href=#dom-path>Path</a></code>()</dt>
+ <dl class=domintro><dt><var title="">path</var> = new <code title=dom-Path2D><a href=#dom-path2d>Path2D</a></code>()</dt>
<dd>
- <p>Creates a new empty <code><a href=#path>Path</a></code> object.</p>
+ <p>Creates a new empty <code><a href=#path2d>Path2D</a></code> object.</p>
</dd>
- <dt><var title="">path</var> = new <code title=dom-Path-copy><a href=#dom-path-copy>Path</a></code>(<var title="">path</var>)</dt>
+ <dt><var title="">path</var> = new <code title=dom-Path2D-copy><a href=#dom-path2d-copy>Path2D</a></code>(<var title="">path</var>)</dt>
<dd>
- <p>Creates a new <code><a href=#path>Path</a></code> object that is a copy of the argument.</p>
+ <p>Creates a new <code><a href=#path2d>Path2D</a></code> object that is a copy of the argument.</p>
</dd>
- <dt><var title="">path</var> = new <code title=dom-Path-merge><a href=#dom-path-merge>Path</a></code>(<var title="">paths</var> [, <var title="">fillRule</var> ] )</dt>
+ <dt><var title="">path</var> = new <code title=dom-Path2D-merge><a href=#dom-path2d-merge>Path2D</a></code>(<var title="">paths</var> [, <var title="">fillRule</var> ] )</dt>
<dd>
- <p>Creates a new <code><a href=#path>Path</a></code> object that describes a path that outlines the given <var title="">paths</var>, using the given fill rule.</p>
+ <p>Creates a new <code><a href=#path2d>Path2D</a></code> object that describes a path that outlines the given <var title="">paths</var>, using the given fill rule.</p>
</dd>
- <dt><var title="">path</var> = new <code title=dom-Path-withdata><a href=#dom-path-withdata>Path</a></code>(<var title="">d</var>)</dt>
+ <dt><var title="">path</var> = new <code title=dom-Path2D-withdata><a href=#dom-path2d-withdata>Path2D</a></code>(<var title="">d</var>)</dt>
<dd>
@@ -56722,8 +56724,8 @@
</dd>
- <dt><var title="">path</var> . <code title=dom-path-addPath><a href=#dom-path-addpath>addPath</a></code>(<var title="">path</var>, <var title="">transform</var>)</dt>
- <dt><var title="">path</var> . <code title=dom-path-addPathByStrokingPath><a href=#dom-path-addpathbystrokingpath>addPathByStrokingPath</a></code>(<var title="">path</var>, <var title="">styles</var>, <var title="">transform</var>)</dt>
+ <dt><var title="">path</var> . <code title=dom-Path2D-addPath><a href=#dom-path2d-addpath>addPath</a></code>(<var title="">path</var>, <var title="">transform</var>)</dt>
+ <dt><var title="">path</var> . <code title=dom-Path2D-addPathByStrokingPath><a href=#dom-path2d-addpathbystrokingpath>addPathByStrokingPath</a></code>(<var title="">path</var>, <var title="">styles</var>, <var title="">transform</var>)</dt>
<dd>
@@ -56734,10 +56736,10 @@
</dd>
- <dt><var title="">path</var> . <code title=dom-path-addText><a href=#dom-path-addtext>addText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">x</var>, <var title="">y</var> [, <var title="">maxWidth</var> ] )</dt>
- <dt><var title="">path</var> . <code title=dom-path-addText><a href=#dom-path-addtext>addText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">path</var> [, <var title="">maxWidth</var> ] )</dt>
- <dt><var title="">path</var> . <code title=dom-path-addPathByStrokingText><a href=#dom-path-addpathbystrokingtext>addPathByStrokingText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">x</var>, <var title="">y</var> [, <var title="">maxWidth</var> ] )</dt>
- <dt><var title="">path</var> . <code title=dom-path-addPathByStrokingText><a href=#dom-path-addpathbystrokingtext>addPathByStrokingText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">path</var> [, <var title="">maxWidth</var> ] )</dt>
+ <dt><var title="">path</var> . <code title=dom-Path2D-addText><a href=#dom-path2d-addtext>addText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">x</var>, <var title="">y</var> [, <var title="">maxWidth</var> ] )</dt>
+ <dt><var title="">path</var> . <code title=dom-Path2D-addText><a href=#dom-path2d-addtext>addText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">path</var> [, <var title="">maxWidth</var> ] )</dt>
+ <dt><var title="">path</var> . <code title=dom-Path2D-addPathByStrokingText><a href=#dom-path2d-addpathbystrokingtext>addPathByStrokingText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">x</var>, <var title="">y</var> [, <var title="">maxWidth</var> ] )</dt>
+ <dt><var title="">path</var> . <code title=dom-Path2D-addPathByStrokingText><a href=#dom-path2d-addpathbystrokingtext>addPathByStrokingText</a></code>(<var title="">text</var>, <var title="">styles</var>, <var title="">transform</var>, <var title="">path</var> [, <var title="">maxWidth</var> ] )</dt>
<dd>
@@ -56753,14 +56755,14 @@
</dl><div class=impl>
- <p>The <dfn id=dom-path title=dom-Path><code>Path()</code></dfn> constructor, when invoked, must return a
- newly created <code><a href=#path>Path</a></code> object.</p>
+ <p>The <dfn id=dom-path2d title=dom-Path2D><code>Path()</code></dfn> constructor, when invoked, must return a
+ newly created <code><a href=#path2d>Path2D</a></code> object.</p>
- <hr><p>The <dfn id=dom-path-copy title=dom-Path-copy><code>Path(<var title="">path</var>)</code></dfn> constructor,
- when invoked, must return a newly created <code><a href=#path>Path</a></code> object, to which the subpaths of the
+ <hr><p>The <dfn id=dom-path2d-copy title=dom-Path2D-copy><code>Path(<var title="">path</var>)</code></dfn> constructor,
+ when invoked, must return a newly created <code><a href=#path2d>Path2D</a></code> object, to which the subpaths of the
argument are added. (In other words, it returns a copy of the argument.)</p>
- <hr><p>The <dfn id=dom-path-merge title=dom-Path-merge><code>Path(<var title="">paths</var>, <var title="">fillRule</var>)</code></dfn> constructor, when invoked, must run the following
+ <hr><p>The <dfn id=dom-path2d-merge title=dom-Path2D-merge><code>Path(<var title="">paths</var>, <var title="">fillRule</var>)</code></dfn> constructor, when invoked, must run the following
steps:</p>
<ol><li>
@@ -56801,12 +56803,12 @@
</li>
- <li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path>Path</a></code>
+ <li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path2d>Path2D</a></code>
object.</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>
+ <li><p>Set the <code><a href=#path2d>Path2D</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
+ </ol><hr><p>The <dfn id=dom-path2d-withdata title=dom-Path2D-withdata><code>Path(<var title="">d</var>)</code></dfn> constructor
must run the following steps:</p>
<ol><li>
@@ -56822,16 +56824,16 @@
<li><p>Let (<var title="">x</var>, <var title="">y</var>) be the last point in the SVG
path.</li>
- <li><p>Create a new <code><a href=#path>Path</a></code> object and add all the subpaths in the SVG path, if any, to
- that <code><a href=#path>Path</a></code> object. </p>
+ <li><p>Create a new <code><a href=#path2d>Path2D</a></code> object and add all the subpaths in the SVG path, if any, to
+ that <code><a href=#path2d>Path2D</a></code> object. </p>
- <li><p>Create a new subpath in the <code><a href=#path>Path</a></code> object with (<var title="">x</var>, <var title="">y</var>) as the only point in the subpath.</li>
+ <li><p>Create a new subpath in the <code><a href=#path2d>Path2D</a></code> object with (<var title="">x</var>, <var title="">y</var>) as the only point in the subpath.</li>
- <li><p>Return the <code><a href=#path>Path</a></code> object as the constructed object.</li>
+ <li><p>Return the <code><a href=#path2d>Path2D</a></code> object as the constructed object.</li>
- </ol><hr><p>The <dfn id=dom-path-addpath title=dom-path-addPath><code>addPath(<var title="">b</var>, <var title="">transform</var>)</code></dfn> method, when invoked on a <code><a href=#path>Path</a></code> object <var title="">a</var>, must run the following steps:</p>
+ </ol><hr><p>The <dfn id=dom-path2d-addpath title=dom-Path2D-addPath><code>addPath(<var title="">b</var>, <var title="">transform</var>)</code></dfn> method, when invoked on a <code><a href=#path2d>Path2D</a></code> object <var title="">a</var>, must run the following steps:</p>
- <ol><li><p>If the <code><a href=#path>Path</a></code> object <var title="">b</var> has no subpaths, abort these
+ <ol><li><p>If the <code><a href=#path2d>Path2D</a></code> object <var title="">b</var> has no subpaths, abort these
steps.</li>
<li><p>Create a copy of all the subpaths in <var title="">b</var>. Let this copy be known as <var title="">c</var>.</li>
@@ -56846,11 +56848,11 @@
<li><p>Create a new subpath in <var title="">a</var> with (<var title="">x</var>, <var title="">y</var>) as the only point in the subpath.</li>
- </ol><hr><p>The <dfn id=dom-path-addpathbystrokingpath title=dom-path-addPathByStrokingPath><code>addPathByStrokingPath(<var title="">b</var>, <var title="">styles</var>, <var title="">transform</var>)</code></dfn> method,
- when invoked on a <code><a href=#path>Path</a></code> object <var title="">a</var>, must run the following
+ </ol><hr><p>The <dfn id=dom-path2d-addpathbystrokingpath title=dom-Path2D-addPathByStrokingPath><code>addPathByStrokingPath(<var title="">b</var>, <var title="">styles</var>, <var title="">transform</var>)</code></dfn> method,
+ when invoked on a <code><a href=#path2d>Path2D</a></code> object <var title="">a</var>, must run the following
steps:</p>
- <ol><li><p>If the <code><a href=#path>Path</a></code> object <var title="">b</var> has no subpaths, abort these
+ <ol><li><p>If the <code><a href=#path2d>Path2D</a></code> object <var title="">b</var> has no subpaths, abort these
steps.</li>
<li><p>Create a copy of all the subpaths in <var title="">b</var>. Let this copy be known as <var title="">c</var>.</li>
@@ -56869,12 +56871,12 @@
<li><p>Create a new subpath in <var title="">a</var> with (<var title="">x</var>, <var title="">y</var>) as the only point in the subpath.</li>
- </ol><hr><p>The <dfn id=dom-path-addtext title=dom-path-addText><code>addText()</code></dfn> and <dfn id=dom-path-addpathbystrokingtext title=dom-path-addPathByStrokingText><code>addPathByStrokingText()</code></dfn> methods each
+ </ol><hr><p>The <dfn id=dom-path2d-addtext title=dom-Path2D-addText><code>addText()</code></dfn> and <dfn id=dom-path2d-addpathbystrokingtext title=dom-Path2D-addPathByStrokingText><code>addPathByStrokingText()</code></dfn> methods each
come in two variants: one rendering text at a given coordinate, and one rendering text along a
given path. In both cases, the methods take a <code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code> object argument for
the text and (if appropriate) line styles to use, an <code><a href=#svgmatrix>SVGMatrix</a></code> object <var title="">transform</var> (which can be null), and a maximum width can optionally be provided.</p>
- <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
+ <p>When one of the <code title=dom-Path2D-addText><a href=#dom-path2d-addtext>addText()</a></code> and <code title=dom-Path2D-addPathByStrokingText><a href=#dom-path2d-addpathbystrokingtext>addPathByStrokingText()</a></code> variants that take as
argument an (<var title="">x</var>, <var title="">y</var>) coordinate is invoked, the method must
run the following algorithm:</p>
@@ -56895,7 +56897,7 @@
transformation matrix <var title="">transform</var>, if it is not null.</li>
<!--CLEANUP-->
- <li><p>If the method is <code title=dom-path-addPathByStrokingText><a href=#dom-path-addpathbystrokingtext>addPathByStrokingText()</a></code>, replace <var title="">glyph paths</var> by the result of <a href=#trace-a-path title="trace a path">tracing</a> each <a href=#concept-path title=concept-path>path</a> in <var title="">glyph paths</var>, using the <code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code> object argument for the
+ <li><p>If the method is <code title=dom-Path2D-addPathByStrokingText><a href=#dom-path2d-addpathbystrokingtext>addPathByStrokingText()</a></code>, replace <var title="">glyph paths</var> by the result of <a href=#trace-a-path title="trace a path">tracing</a> each <a href=#concept-path title=concept-path>path</a> in <var title="">glyph paths</var>, using the <code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code> object argument for the
line styles.</p>
<li id=mergeGlyphs>
@@ -56948,18 +56950,18 @@
</li>
- <li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path>Path</a></code>
+ <li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path2d>Path2D</a></code>
object.</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>
+ <li><p>Set the <code><a href=#path2d>Path2D</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>
+ </ol><p>When one of the <code title=dom-Path2D-addText><a href=#dom-path2d-addtext>addText()</a></code> and <code title=dom-Path2D-addPathByStrokingText><a href=#dom-path2d-addpathbystrokingtext>addPathByStrokingText()</a></code> variants that take as
+ argument a <code><a href=#path2d>Path2D</a></code> object is invoked, the method must run the following algorithm:</p>
- <ol><li><p>Let <var title="">target</var> be the <code><a href=#path>Path</a></code> object on which the method was
+ <ol><li><p>Let <var title="">target</var> be the <code><a href=#path2d>Path2D</a></code> object on which the method was
invoked.</li>
- <li><p>Let <var title="">path</var> be the <code><a href=#path>Path</a></code> object that was provided in the
+ <li><p>Let <var title="">path</var> be the <code><a href=#path2d>Path2D</a></code> object that was provided in the
method's arguments.</li>
<li><p>Run the <a href=#text-preparation-algorithm>text preparation algorithm</a>, passing it <var title="">text</var>, the
@@ -57031,7 +57033,7 @@
<li><p>Transform all the coordinates and lines in <var title="">glyph subpaths</var> by the
transformation matrix <var title="">transform</var>, if it is not null.</li>
- <li><p>If the method is <code title=dom-path-addPathByStrokingText><a href=#dom-path-addpathbystrokingtext>addPathByStrokingText()</a></code>, replace <var title="">glyph subpaths</var> by the result of <a href=#trace-a-path title="trace a path">tracing</a> <var title="">glyph subpaths</var>, using the <code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code> object argument for
+ <li><p>If the method is <code title=dom-Path2D-addPathByStrokingText><a href=#dom-path2d-addpathbystrokingtext>addPathByStrokingText()</a></code>, replace <var title="">glyph subpaths</var> by the result of <a href=#trace-a-path title="trace a path">tracing</a> <var title="">glyph subpaths</var>, using the <code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code> object argument for
the line styles.</p>
<li><p>Add all the subpaths in <var title="">glyph subpaths</var> to <var title="">transformed path list</var>.</li>
@@ -57060,7 +57062,7 @@
<li><p>Add all the subpaths in <var title="">merged path</var> to <var title="">target</var>.</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>
+ <li><p>Set the <code><a href=#path2d>Path2D</a></code> object's <a href=#need-new-subpath>need new subpath</a> flag.</li>
</ol></div>
@@ -57073,7 +57075,7 @@
initialized to the identity transform.</p>
<p>The transformation matrix is applied to coordinates when creating the <a href=#current-default-path>current default
- path</a>, and when painting text, shapes, and <code><a href=#path>Path</a></code> objects, on
+ path</a>, and when painting text, shapes, and <code><a href=#path2d>Path2D</a></code> objects, on
<code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> objects.</p> <!-- conformance criteria for actual drawing
are described in the various sections below -->
@@ -58180,12 +58182,12 @@
zero subpaths.</p>
<p>Where the following method definitions use the term <i>intended path</i>, it means the
- <code><a href=#path>Path</a></code> argument, if one was provided, or the <a href=#current-default-path>current default path</a>
+ <code><a href=#path2d>Path2D</a></code> argument, if one was provided, or the <a href=#current-default-path>current default path</a>
otherwise.</p>
- <p>When the intended path is a <code><a href=#path>Path</a></code> object, the coordinates and lines of its subpaths
+ <p>When the intended path is a <code><a href=#path2d>Path2D</a></code> object, the coordinates and lines of its subpaths
must be transformed according to the <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> object's <a href=#transformations title=dom-context-2d-transformation>current transformation matrix</a> when used by these
- methods (without affecting the <code><a href=#path>Path</a></code> object itself). When the intended path is the
+ methods (without affecting the <code><a href=#path2d>Path2D</a></code> object itself). When the intended path is the
<a href=#current-default-path>current default path</a>, it is not affected by the transform. (This is because
transformations already affect the <a href=#current-default-path>current default path</a> when it is constructed, so
applying it when it is painted as well would result in a double transformation.)</p>
@@ -58207,7 +58209,7 @@
if the intended path is the <a href=#current-default-path>current default path</a>.</p>
<p>Paths, when filled or stroked, must be painted without affecting the <a href=#current-default-path>current default
- path</a> or any <code><a href=#path>Path</a></code> objects, and must be subject to <a href=#shadows title=shadows>shadow
+ path</a> or any <code><a href=#path2d>Path2D</a></code> objects, and must be subject to <a href=#shadows title=shadows>shadow
effects</a>, <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, the <a href=#clipping-region>clipping
region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
operators</a>. (The effect of transformations is described above and varies based on which path
@@ -58647,7 +58649,7 @@
<dl><dt><dfn id=dom-hitregionoptions-path title=dom-HitRegionOptions-path><code>path</code></dfn> (default null)</dt>
- <dd>A <code><a href=#path>Path</a></code> object that describes the pixels that form part of the region. If this
+ <dd>A <code><a href=#path2d>Path2D</a></code> object that describes the pixels that form part of the region. If this
member is not provided or is set to null, the <a href=#current-default-path>current default path</a> is used
instead.</dd>
@@ -58890,6 +58892,8 @@
<li><p>Let <var title="">specified pixels</var> be the pixels contained in <var title="">source
path</var>, using the <a href=#fill-rule>fill rule</a> indicated by the <code title=dom-HitRegionOptions-fillRule><a href=#dom-hitregionoptions-fillrule>fillRule</a></code> member.</li>
+<!--XXX-->
+
<li><p>If the <var title="">arguments</var> object's <code title=dom-HitRegionOptions-id><a href=#dom-hitregionoptions-id>id</a></code> member is the empty string, let it be null
instead.</li>
@@ -103604,7 +103608,7 @@
<li><code><a href=#navigatorplugins>NavigatorPlugins</a></code>
<li><code><a href=#navigatorstorageutils>NavigatorStorageUtils</a></code>
<li><code><a href=#pagetransitionevent>PageTransitionEvent</a></code>
- <li><code><a href=#path>Path</a></code>
+ <li><code><a href=#path2d>Path2D</a></code>
<li><code><a href=#dom-plugin>Plugin</a></code>
<li><code><a href=#pluginarray>PluginArray</a></code>
<li><code><a href=#popstateevent>PopStateEvent</a></code>
Modified: source
===================================================================
--- source 2014-04-02 22:47:04 UTC (rev 8562)
+++ source 2014-04-03 00:07:44 UTC (rev 8563)
@@ -60578,22 +60578,22 @@
// path API (see also <span>CanvasPathMethods</span>)
void <span data-x="dom-context-2d-beginPath">beginPath</span>();
void <span data-x="dom-context-2d-fill">fill</span>(optional <span>CanvasFillRule</span> fillRule = "<span data-x="dom-context-2d-fillRule-nonzero">nonzero</span>");
- void <span data-x="dom-context-2d-fill">fill</span>(<span>Path</span> path, optional <span>CanvasFillRule</span> fillRule = "<span data-x="dom-context-2d-fillRule-nonzero">nonzero</span>");
+ void <span data-x="dom-context-2d-fill">fill</span>(<span>Path2D</span> path, optional <span>CanvasFillRule</span> fillRule = "<span data-x="dom-context-2d-fillRule-nonzero">nonzero</span>");
void <span data-x="dom-context-2d-stroke">stroke</span>();
- void <span data-x="dom-context-2d-stroke">stroke</span>(<span>Path</span> path);
+ void <span data-x="dom-context-2d-stroke">stroke</span>(<span>Path2D</span> path);
void <span data-x="dom-context-2d-drawSystemFocusRing">drawSystemFocusRing</span>(<span>Element</span> element);
- void <span data-x="dom-context-2d-drawSystemFocusRing">drawSystemFocusRing</span>(<span>Path</span> path, <span>Element</span> element);
+ void <span data-x="dom-context-2d-drawSystemFocusRing">drawSystemFocusRing</span>(<span>Path2D</span> path, <span>Element</span> element);
boolean <span data-x="dom-context-2d-drawCustomFocusRing">drawCustomFocusRing</span>(<span>Element</span> element);
- boolean <span data-x="dom-context-2d-drawCustomFocusRing">drawCustomFocusRing</span>(<span>Path</span> path, <span>Element</span> element);
+ boolean <span data-x="dom-context-2d-drawCustomFocusRing">drawCustomFocusRing</span>(<span>Path2D</span> path, <span>Element</span> element);
void <span data-x="dom-context-2d-scrollPathIntoView">scrollPathIntoView</span>();
- void <span data-x="dom-context-2d-scrollPathIntoView">scrollPathIntoView</span>(<span>Path</span> path);
+ void <span data-x="dom-context-2d-scrollPathIntoView">scrollPathIntoView</span>(<span>Path2D</span> path);
void <span data-x="dom-context-2d-clip">clip</span>(optional <span>CanvasFillRule</span> fillRule = "<span data-x="dom-context-2d-fillRule-nonzero">nonzero</span>");
- void <span data-x="dom-context-2d-clip">clip</span>(<span>Path</span> path, optional <span>CanvasFillRule</span> fillRule = "<span data-x="dom-context-2d-fillRule-nonzero">nonzero</span>");
+ void <span data-x="dom-context-2d-clip">clip</span>(<span>Path2D</span> path, optional <span>CanvasFillRule</span> fillRule = "<span data-x="dom-context-2d-fillRule-nonzero">nonzero</span>");
void <span data-x="dom-context-2d-resetClip">resetClip</span>();
boolean <span data-x="dom-context-2d-isPointInPath">isPointInPath</span>(unrestricted double x, unrestricted double y, optional <span>CanvasFillRule</span> fillRule = "<span data-x="dom-context-2d-fillRule-nonzero">nonzero</span>");
- boolean <span data-x="dom-context-2d-isPointInPath">isPointInPath</span>(<span>Path</span> path, unrestricted double x, unrestricted double y, optional <span>CanvasFillRule</span> fillRule = "<span data-x="dom-context-2d-fillRule-nonzero">nonzero</span>");
+ boolean <span data-x="dom-context-2d-isPointInPath">isPointInPath</span>(<span>Path2D</span> path, unrestricted double x, unrestricted double y, optional <span>CanvasFillRule</span> fillRule = "<span data-x="dom-context-2d-fillRule-nonzero">nonzero</span>");
boolean <span data-x="dom-context-2d-isPointInStroke">isPointInStroke</span>(unrestricted double x, unrestricted double y);
- boolean <span data-x="dom-context-2d-isPointInStroke">isPointInStroke</span>(<span>Path</span> path, unrestricted double x, unrestricted double y);
+ boolean <span data-x="dom-context-2d-isPointInStroke">isPointInStroke</span>(<span>Path2D</span> path, unrestricted double x, unrestricted double y);
// text (see also the <span>CanvasDrawingStyles</span> interface)
void <span data-x="dom-context-2d-fillText">fillText</span>(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
@@ -60688,7 +60688,7 @@
};
dictionary <dfn>HitRegionOptions</dfn> {
- <span>Path</span>? <span data-x="dom-HitRegionOptions-path">path</span> = null;
+ <span>Path2D</span>? <span data-x="dom-HitRegionOptions-path">path</span> = null;
<span>CanvasFillRule</span> <span data-x="dom-HitRegionOptions-fillRule">fillRule</span> = "<span data-x="dom-context-2d-fillRule-nonzero">nonzero</span>";
<!-- <span>SVGMatrix</span>? <span data-x="dom-HitRegionOptions-transform">transform</span> = null;
--> DOMString <span data-x="dom-HitRegionOptions-id">id</span> = ""; <!-- "" is converted to null internally by addHitRegion() -->
@@ -60714,19 +60714,19 @@
interface <dfn>DrawingStyle</dfn> { };
<span>DrawingStyle</span> implements <span>CanvasDrawingStyles</span>;
-[<span data-x="dom-Path">Constructor</span>,
- <span data-x="dom-Path-copy">Constructor</span>(<span>Path</span> path),
- <span data-x="dom-Path-merge">Constructor</span>(<span>Path</span>[] paths, <span>CanvasFillRule</span> fillRule = "<span data-x="dom-context-2d-fillRule-nonzero">nonzero</span>"),
- <span data-x="dom-Path-withdata">Constructor</span>(DOMString d), Exposed=Window,Worker]
-interface <dfn>Path</dfn> {
- void <span data-x="dom-path-addPath">addPath</span>(<span>Path</span> path, <span>SVGMatrix</span>? transformation);
- void <span data-x="dom-path-addPathByStrokingPath">addPathByStrokingPath</span>(<span>Path</span> path, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation);
- void <span data-x="dom-path-addText">addText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
- void <span data-x="dom-path-addPathByStrokingText">addPathByStrokingText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
- void <span data-x="dom-path-addText">addText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, <span>Path</span> path, optional unrestricted double maxWidth);
- void <span data-x="dom-path-addPathByStrokingText">addPathByStrokingText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, <span>Path</span> path, optional unrestricted double maxWidth);
+[<span data-x="dom-Path2D">Constructor</span>,
+ <span data-x="dom-Path2D-copy">Constructor</span>(<span>Path2D</span> path),
+ <span data-x="dom-Path2D-merge">Constructor</span>(<span>Path2D</span>[] paths, <span>CanvasFillRule</span> fillRule = "<span data-x="dom-context-2d-fillRule-nonzero">nonzero</span>"),
+ <span data-x="dom-Path2D-withdata">Constructor</span>(DOMString d), Exposed=Window,Worker]
+interface <dfn>Path2D</dfn> {
+ void <span data-x="dom-Path2D-addPath">addPath</span>(<span>Path2D</span> path, <span>SVGMatrix</span>? transformation);
+ void <span data-x="dom-Path2D-addPathByStrokingPath">addPathByStrokingPath</span>(<span>Path2D</span> path, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation);
+ void <span data-x="dom-Path2D-addText">addText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
+ void <span data-x="dom-Path2D-addPathByStrokingText">addPathByStrokingText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
+ void <span data-x="dom-Path2D-addText">addText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, <span>Path2D</span> path, optional unrestricted double maxWidth);
+ void <span data-x="dom-Path2D-addPathByStrokingText">addPathByStrokingText</span>(DOMString text, <span>CanvasDrawingStyles</span> styles, <span>SVGMatrix</span>? transformation, <span>Path2D</span> path, optional unrestricted double maxWidth);
};
-<span>Path</span> implements <span>CanvasPathMethods</span>;</pre>
+<span>Path2D</span> implements <span>CanvasPathMethods</span>;</pre>
<!-- ARC-ORDER note (see above):
some demos rely on the precise order of the arc() and arcTo()
@@ -61322,12 +61322,14 @@
</div>
+<!--CLEANUP--><!-- anything involving Path2D -->
+
<h6><code>DrawingStyle</code> objects</h6>
<p>All the line styles (line width, caps, joins, and dash patterns) and text styles (fonts)
described in the next two sections apply to <code>CanvasRenderingContext2D</code> objects and to
<code>DrawingStyle</code> objects. This section defines the constructor used to obtain a
- <code>DrawingStyle</code> object. This object is then used by methods on <code>Path</code> objects
+ <code>DrawingStyle</code> object. This object is then used by methods on <code>Path2D</code> objects
to control how text and paths are rasterised and stroked.</p>
<dl class="domintro">
@@ -62910,40 +62912,40 @@
- <h6><code>Path</code> objects</h6>
+ <h6><code>Path2D</code> objects</h6>
- <p><code>Path</code> objects can be used to declare paths that are then later used on
+ <p><code>Path2D</code> objects can be used to declare paths that are then later used on
<code>CanvasRenderingContext2D</code> objects. In addition to many of the APIs described in
- earlier sections, <code>Path</code> objects have methods to combine paths, and to add text to
+ earlier sections, <code>Path2D</code> objects have methods to combine paths, and to add text to
paths.</p>
<dl class="domintro">
- <dt><var data-x="">path</var> = new <code data-x="dom-Path">Path</code>()</dt>
+ <dt><var data-x="">path</var> = new <code data-x="dom-Path2D">Path2D</code>()</dt>
<dd>
- <p>Creates a new empty <code>Path</code> object.</p>
+ <p>Creates a new empty <code>Path2D</code> object.</p>
</dd>
- <dt><var data-x="">path</var> = new <code data-x="dom-Path-copy">Path</code>(<var data-x="">path</var>)</dt>
+ <dt><var data-x="">path</var> = new <code data-x="dom-Path2D-copy">Path2D</code>(<var data-x="">path</var>)</dt>
<dd>
- <p>Creates a new <code>Path</code> object that is a copy of the argument.</p>
+ <p>Creates a new <code>Path2D</code> object that is a copy of the argument.</p>
</dd>
- <dt><var data-x="">path</var> = new <code data-x="dom-Path-merge">Path</code>(<var data-x="">paths</var> [, <var data-x="">fillRule</var> ] )</dt>
+ <dt><var data-x="">path</var> = new <code data-x="dom-Path2D-merge">Path2D</code>(<var data-x="">paths</var> [, <var data-x="">fillRule</var> ] )</dt>
<dd>
- <p>Creates a new <code>Path</code> object that describes a path that outlines the given <var data-x="">paths</var>, using the given fill rule.</p>
+ <p>Creates a new <code>Path2D</code> object that describes a path that outlines the given <var data-x="">paths</var>, using the given fill rule.</p>
</dd>
- <dt><var data-x="">path</var> = new <code data-x="dom-Path-withdata">Path</code>(<var data-x="">d</var>)</dt>
+ <dt><var data-x="">path</var> = new <code data-x="dom-Path2D-withdata">Path2D</code>(<var data-x="">d</var>)</dt>
<dd>
@@ -62951,8 +62953,8 @@
</dd>
- <dt><var data-x="">path</var> . <code data-x="dom-path-addPath">addPath</code>(<var data-x="">path</var>, <var data-x="">transform</var>)</dt>
- <dt><var data-x="">path</var> . <code data-x="dom-path-addPathByStrokingPath">addPathByStrokingPath</code>(<var data-x="">path</var>, <var data-x="">styles</var>, <var data-x="">transform</var>)</dt>
+ <dt><var data-x="">path</var> . <code data-x="dom-Path2D-addPath">addPath</code>(<var data-x="">path</var>, <var data-x="">transform</var>)</dt>
+ <dt><var data-x="">path</var> . <code data-x="dom-Path2D-addPathByStrokingPath">addPathByStrokingPath</code>(<var data-x="">path</var>, <var data-x="">styles</var>, <var data-x="">transform</var>)</dt>
<dd>
@@ -62964,10 +62966,10 @@
</dd>
- <dt><var data-x="">path</var> . <code data-x="dom-path-addText">addText</code>(<var data-x="">text</var>, <var data-x="">styles</var>, <var data-x="">transform</var>, <var data-x="">x</var>, <var data-x="">y</var> [, <var data-x="">maxWidth</var> ] )</dt>
- <dt><var data-x="">path</var> . <code data-x="dom-path-addText">addText</code>(<var data-x="">text</var>, <var data-x="">styles</var>, <var data-x="">transform</var>, <var data-x="">path</var> [, <var data-x="">maxWidth</var> ] )</dt>
- <dt><var data-x="">path</var> . <code data-x="dom-path-addPathByStrokingText">addPathByStrokingText</code>(<var data-x="">text</var>, <var data-x="">styles</var>, <var data-x="">transform</var>, <var data-x="">x</var>, <var data-x="">y</var> [, <var data-x="">maxWidth</var> ] )</dt>
- <dt><var data-x="">path</var> . <code data-x="dom-path-addPathByStrokingText">addPathByStrokingText</code>(<var data-x="">text</var>, <var data-x="">styles</var>, <var data-x="">transform</var>, <var data-x="">path</var> [, <var data-x="">maxWidth</var> ] )</dt>
+ <dt><var data-x="">path</var> . <code data-x="dom-Path2D-addText">addText</code>(<var data-x="">text</var>, <var data-x="">styles</var>, <var data-x="">transform</var>, <var data-x="">x</var>, <var data-x="">y</var> [, <var data-x="">maxWidth</var> ] )</dt>
+ <dt><var data-x="">path</var> . <code data-x="dom-Path2D-addText">addText</code>(<var data-x="">text</var>, <var data-x="">styles</var>, <var data-x="">transform</var>, <var data-x="">path</var> [, <var data-x="">maxWidth</var> ] )</dt>
+ <dt><var data-x="">path</var> . <code data-x="dom-Path2D-addPathByStrokingText">addPathByStrokingText</code>(<var data-x="">text</var>, <var data-x="">styles</var>, <var data-x="">transform</var>, <var data-x="">x</var>, <var data-x="">y</var> [, <var data-x="">maxWidth</var> ] )</dt>
+ <dt><var data-x="">path</var> . <code data-x="dom-Path2D-addPathByStrokingText">addPathByStrokingText</code>(<var data-x="">text</var>, <var data-x="">styles</var>, <var data-x="">transform</var>, <var data-x="">path</var> [, <var data-x="">maxWidth</var> ] )</dt>
<dd>
@@ -62986,18 +62988,18 @@
<div class="impl">
- <p>The <dfn data-x="dom-Path"><code>Path()</code></dfn> constructor, when invoked, must return a
- newly created <code>Path</code> object.</p>
+ <p>The <dfn data-x="dom-Path2D"><code>Path()</code></dfn> constructor, when invoked, must return a
+ newly created <code>Path2D</code> object.</p>
<hr>
- <p>The <dfn data-x="dom-Path-copy"><code>Path(<var data-x="">path</var>)</code></dfn> constructor,
- when invoked, must return a newly created <code>Path</code> object, to which the subpaths of the
+ <p>The <dfn data-x="dom-Path2D-copy"><code>Path(<var data-x="">path</var>)</code></dfn> constructor,
+ when invoked, must return a newly created <code>Path2D</code> object, to which the subpaths of the
argument are added. (In other words, it returns a copy of the argument.)</p>
<hr>
- <p>The <dfn data-x="dom-Path-merge"><code>Path(<var data-x="">paths</var>, <var
+ <p>The <dfn data-x="dom-Path2D-merge"><code>Path(<var data-x="">paths</var>, <var
data-x="">fillRule</var>)</code></dfn> constructor, when invoked, must run the following
steps:</p>
@@ -63045,16 +63047,16 @@
</li>
- <li><p>Add all the subpaths in <var data-x="">merged path</var> to the <code>Path</code>
+ <li><p>Add all the subpaths in <var data-x="">merged path</var> to the <code>Path2D</code>
object.</p></li>
- <li><p>Set the <code>Path</code> object's <span>need new subpath</span> flag.</p></li>
+ <li><p>Set the <code>Path2D</code> object's <span>need new subpath</span> flag.</p></li>
</ol>
<hr>
- <p>The <dfn data-x="dom-Path-withdata"><code>Path(<var data-x="">d</var>)</code></dfn> constructor
+ <p>The <dfn data-x="dom-Path2D-withdata"><code>Path(<var data-x="">d</var>)</code></dfn> constructor
must run the following steps:</p>
<ol>
@@ -63072,25 +63074,25 @@
<li><p>Let (<var data-x="">x</var>, <var data-x="">y</var>) be the last point in the SVG
path.</p></li>
- <li><p>Create a new <code>Path</code> object and add all the subpaths in the SVG path, if any, to
- that <code>Path</code> object. </p>
+ <li><p>Create a new <code>Path2D</code> object and add all the subpaths in the SVG path, if any, to
+ that <code>Path2D</code> object. </p>
- <li><p>Create a new subpath in the <code>Path</code> object with (<var data-x="">x</var>, <var
+ <li><p>Create a new subpath in the <code>Path2D</code> object with (<var data-x="">x</var>, <var
data-x="">y</var>) as the only point in the subpath.</p></li>
- <li><p>Return the <code>Path</code> object as the constructed object.</p></li>
+ <li><p>Return the <code>Path2D</code> object as the constructed object.</p></li>
</ol>
<hr>
- <p>The <dfn data-x="dom-path-addPath"><code>addPath(<var data-x="">b</var>, <var
- data-x="">transform</var>)</code></dfn> method, when invoked on a <code>Path</code> object <var
+ <p>The <dfn data-x="dom-Path2D-addPath"><code>addPath(<var data-x="">b</var>, <var
+ data-x="">transform</var>)</code></dfn> method, when invoked on a <code>Path2D</code> object <var
data-x="">a</var>, must run the following steps:</p>
<ol>
- <li><p>If the <code>Path</code> object <var data-x="">b</var> has no subpaths, abort these
+ <li><p>If the <code>Path2D</code> object <var data-x="">b</var> has no subpaths, abort these
steps.</p></li>
<li><p>Create a copy of all the subpaths in <var data-x="">b</var>. Let this copy be known as <var
@@ -63111,14 +63113,14 @@
<hr>
- <p>The <dfn data-x="dom-path-addPathByStrokingPath"><code>addPathByStrokingPath(<var
+ <p>The <dfn data-x="dom-Path2D-addPathByStrokingPath"><code>addPathByStrokingPath(<var
data-x="">b</var>, <var data-x="">styles</var>, <var data-x="">transform</var>)</code></dfn> method,
- when invoked on a <code>Path</code> object <var data-x="">a</var>, must run the following
+ when invoked on a <code>Path2D</code> object <var data-x="">a</var>, must run the following
steps:</p>
<ol>
- <li><p>If the <code>Path</code> object <var data-x="">b</var> has no subpaths, abort these
+ <li><p>If the <code>Path2D</code> object <var data-x="">b</var> has no subpaths, abort these
steps.</p></li>
<li><p>Create a copy of all the subpaths in <var data-x="">b</var>. Let this copy be known as <var
@@ -63143,15 +63145,15 @@
<hr>
- <p>The <dfn data-x="dom-path-addText"><code>addText()</code></dfn> and <dfn
- data-x="dom-path-addPathByStrokingText"><code>addPathByStrokingText()</code></dfn> methods each
+ <p>The <dfn data-x="dom-Path2D-addText"><code>addText()</code></dfn> and <dfn
+ data-x="dom-Path2D-addPathByStrokingText"><code>addPathByStrokingText()</code></dfn> methods each
come in two variants: one rendering text at a given coordinate, and one rendering text along a
given path. In both cases, the methods take a <code>CanvasDrawingStyles</code> object argument for
the text and (if appropriate) line styles to use, an <code>SVGMatrix</code> object <var
data-x="">transform</var> (which can be null), and a maximum width can optionally be provided.</p>
- <p>When one of the <code data-x="dom-path-addText">addText()</code> and <code
- data-x="dom-path-addPathByStrokingText">addPathByStrokingText()</code> variants that take as
+ <p>When one of the <code data-x="dom-Path2D-addText">addText()</code> and <code
+ data-x="dom-Path2D-addPathByStrokingText">addPathByStrokingText()</code> variants that take as
argument an (<var data-x="">x</var>, <var data-x="">y</var>) coordinate is invoked, the method must
run the following algorithm:</p>
@@ -63176,7 +63178,7 @@
<!--CLEANUP-->
<li><p>If the method is <code
- data-x="dom-path-addPathByStrokingText">addPathByStrokingText()</code>, replace <var
+ data-x="dom-Path2D-addPathByStrokingText">addPathByStrokingText()</code>, replace <var
data-x="">glyph paths</var> by the result of <span data-x="trace a path">tracing</span> each <span data-x="concept-path">path</span> in <var
data-x="">glyph paths</var>, using the <code>CanvasDrawingStyles</code> object argument for the
line styles.</p>
@@ -63232,23 +63234,23 @@
</li>
- <li><p>Add all the subpaths in <var data-x="">merged path</var> to the <code>Path</code>
+ <li><p>Add all the subpaths in <var data-x="">merged path</var> to the <code>Path2D</code>
object.</p></li>
- <li><p>Set the <code>Path</code> object's <span>need new subpath</span> flag.</p></li>
+ <li><p>Set the <code>Path2D</code> object's <span>need new subpath</span> flag.</p></li>
</ol>
- <p>When one of the <code data-x="dom-path-addText">addText()</code> and <code
- data-x="dom-path-addPathByStrokingText">addPathByStrokingText()</code> variants that take as
- argument a <code>Path</code> object is invoked, the method must run the following algorithm:</p>
+ <p>When one of the <code data-x="dom-Path2D-addText">addText()</code> and <code
+ data-x="dom-Path2D-addPathByStrokingText">addPathByStrokingText()</code> variants that take as
+ argument a <code>Path2D</code> object is invoked, the method must run the following algorithm:</p>
<ol>
- <li><p>Let <var data-x="">target</var> be the <code>Path</code> object on which the method was
+ <li><p>Let <var data-x="">target</var> be the <code>Path2D</code> object on which the method was
invoked.</p></li>
- <li><p>Let <var data-x="">path</var> be the <code>Path</code> object that was provided in the
+ <li><p>Let <var data-x="">path</var> be the <code>Path2D</code> object that was provided in the
method's arguments.</p></li>
<li><p>Run the <span>text preparation algorithm</span>, passing it <var data-x="">text</var>, the
@@ -63339,7 +63341,7 @@
transformation matrix <var data-x="">transform</var>, if it is not null.</p></li>
<li><p>If the method is <code
- data-x="dom-path-addPathByStrokingText">addPathByStrokingText()</code>, replace <var
+ data-x="dom-Path2D-addPathByStrokingText">addPathByStrokingText()</code>, replace <var
data-x="">glyph subpaths</var> by the result of <span data-x="trace a path">tracing</span> <var
data-x="">glyph subpaths</var>, using the <code>CanvasDrawingStyles</code> object argument for
the line styles.</p>
@@ -63374,7 +63376,7 @@
<li><p>Add all the subpaths in <var data-x="">merged path</var> to <var
data-x="">target</var>.</p></li>
- <li><p>Set the <code>Path</code> object's <span>need new subpath</span> flag.</p></li>
+ <li><p>Set the <code>Path2D</code> object's <span>need new subpath</span> flag.</p></li>
</ol>
@@ -63389,7 +63391,7 @@
initialized to the identity transform.</p>
<p>The transformation matrix is applied to coordinates when creating the <span>current default
- path</span>, and when painting text, shapes, and <code>Path</code> objects, on
+ path</span>, and when painting text, shapes, and <code>Path2D</code> objects, on
<code>CanvasRenderingContext2D</code> objects.</p> <!-- conformance criteria for actual drawing
are described in the various sections below -->
@@ -64678,13 +64680,13 @@
zero subpaths.</p>
<p>Where the following method definitions use the term <i>intended path</i>, it means the
- <code>Path</code> argument, if one was provided, or the <span>current default path</span>
+ <code>Path2D</code> argument, if one was provided, or the <span>current default path</span>
otherwise.</p>
- <p>When the intended path is a <code>Path</code> object, the coordinates and lines of its subpaths
+ <p>When the intended path is a <code>Path2D</code> object, the coordinates and lines of its subpaths
must be transformed according to the <code>CanvasRenderingContext2D</code> object's <span
data-x="dom-context-2d-transformation">current transformation matrix</span> when used by these
- methods (without affecting the <code>Path</code> object itself). When the intended path is the
+ methods (without affecting the <code>Path2D</code> object itself). When the intended path is the
<span>current default path</span>, it is not affected by the transform. (This is because
transformations already affect the <span>current default path</span> when it is constructed, so
applying it when it is painted as well would result in a double transformation.)</p>
@@ -64708,7 +64710,7 @@
if the intended path is the <span>current default path</span>.</p>
<p>Paths, when filled or stroked, must be painted without affecting the <span>current default
- path</span> or any <code>Path</code> objects, and must be subject to <span data-x="shadows">shadow
+ path</span> or any <code>Path2D</code> objects, and must be subject to <span data-x="shadows">shadow
effects</span>, <span data-x="dom-context-2d-globalAlpha">global alpha</span>, the <span>clipping
region</span>, and <span data-x="dom-context-2d-globalCompositeOperation">global composition
operators</span>. (The effect of transformations is described above and varies based on which path
@@ -65239,7 +65241,7 @@
<dt><dfn data-x="dom-HitRegionOptions-path"><code>path</code></dfn> (default null)</dt>
- <dd>A <code>Path</code> object that describes the pixels that form part of the region. If this
+ <dd>A <code>Path2D</code> object that describes the pixels that form part of the region. If this
member is not provided or is set to null, the <span>current default path</span> is used
instead.</dd>
@@ -65552,6 +65554,8 @@
path</var>, using the <span>fill rule</span> indicated by the <code
data-x="dom-HitRegionOptions-fillRule">fillRule</code> member.</p></li>
+<!--XXX-->
+
<li><p>If the <var data-x="">arguments</var> object's <code
data-x="dom-HitRegionOptions-id">id</code> member is the empty string, let it be null
instead.</p></li>
More information about the Commit-Watchers
mailing list