html5/2dcontext Overview.html,1.129,1.130

Update of /sources/public/html5/2dcontext
In directory hutz:/tmp/cvs-serv5622

Modified Files:
	Overview.html 
Log Message:
Add SVG paths to Path objects in canvas. (whatwg r7026)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/2dcontext/Overview.html,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- Overview.html	13 Mar 2012 19:34:14 -0000	1.129
+++ Overview.html	13 Mar 2012 22:46:38 -0000	1.130
@@ -775,6 +775,7 @@
 
 [<a href="#dom-path" title="dom-Path">Constructor</a>(optional <span>Element</span> scope)]
 interface <dfn id="path">Path</dfn> {
+  void <a href="#dom-path-addpathdata" title="dom-path-addPathData">addPathData</a>(DOMString d);
   void <a href="#dom-path-addfill" title="dom-path-addFill">addFill</a>(<a href="#path">Path</a> path);
   void <a href="#dom-path-addstroke" title="dom-path-addStroke">addStroke</a>(<a href="#path">Path</a> path);
   void <span title="dom-path-addFillText">addFillText</span>(DOMString text, double x, double y, optional double maxWidth);
@@ -1822,6 +1823,14 @@
 
    </dd>
 
+   <dt><var title="">path</var> . <code title="dom-path-addPathData"><a href="#dom-path-addpathdata">addPathData</a></code>(<var title="">d</var>)</dt>
+
+   <dd>
+
+    <p>Adds to the path the path described by the argument, interpreted as SVG path data. <a href="#refsSVG">[SVG]</a></p>
+
+   </dd>
+
    <dt><var title="">path</var> . <code title="dom-path-addFill"><a href="#dom-path-addfill">addFill</a></code>(<var title="">path</var>)</dt>
    <dt><var title="">path</var> . <code title="dom-path-addStroke"><a href="#dom-path-addstroke">addStroke</a></code>(<var title="">path</var>)</dt>
 
@@ -1856,7 +1865,32 @@
   <code>Window</code> object on which the interface object of the
   invoked constructor is found.</p>
 
-  <p>The <dfn id="dom-path-addfill" title="dom-path-addFill"><code>addFill(<var title="">b</var>)</code></dfn> method, when invoked on a
+
+  <p>The <dfn id="dom-path-addpathdata" title="dom-path-addPathData"><code>addPathData(<var title="">d</var>)</code> method must run the following steps:</dfn></p>
+
+  <ol><li><p>Parse and interpret the <var title="">d</var> argument
+   according to the SVG specification's rules for path data, thus
+   obtaining an SVG path. <a href="#refsSVG">[SVG]</a></li>
+
+   <li><p>If this failed in some way, then throw a
+   <code>SyntaxError</code> exception, and abort these steps.</li>
+
+   <li><p>Transform all the coordinates and lines in the SVG path by
+   the <a href="#transformations" title="dom-context-2d-transformation">current
+   transformation matrix</a> of the <code><a href="#path">Path</a></code>
+   object.</li>
+
+   <li><p>Let (<var title="">x</var>, <var title="">y</var>) be the
+   last point in the SVG path.</li>
+
+   <li><p>Add all the subpaths in the SVG path, if any, to the
+   <code><a href="#path">Path</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>
+
+  </ol><p>The <dfn id="dom-path-addfill" title="dom-path-addFill"><code>addFill(<var title="">b</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>
 
@@ -1866,9 +1900,8 @@
    <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>
 
-   <li><p>Transform all the coordinates in <var title="">c</var> by
-   the <a href="#transformations" title="dom-context-2d-transformation">current
-   transformation matrix</a> of <var title="">a</var>.</li>
+   <li><p>Transform all the coordinates and lines in <var title="">c</var> by the <a href="#transformations" title="dom-context-2d-transformation">current transformation
+   matrix</a> of <var title="">a</var>.</li>
 
    <li><p>Let (<var title="">x</var>, <var title="">y</var>) be the
    last point in the last subpath of <var title="">c</var>.</li>
@@ -1888,9 +1921,8 @@
    <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>
 
-   <li><p>Transform all the coordinates in <var title="">c</var> by
-   the <a href="#transformations" title="dom-context-2d-transformation">current
-   transformation matrix</a> of <var title="">a</var>.</li>
+   <li><p>Transform all the coordinates and lines in <var title="">c</var> by the <a href="#transformations" title="dom-context-2d-transformation">current transformation
+   matrix</a> of <var title="">a</var>.</li>
 
    <li><p>Create a new list of subpaths <var title="">d</var>,
    consisting of the subpaths necessary to describe the result of
@@ -1945,8 +1977,7 @@
    These subpaths in <var title="">glyph subpaths</var> must also all
    wind clockwise.</p>
 
-   <li><p>Transform all the coordinates in <var title="">glyph
-   subpaths</var> by the <a href="#transformations" title="dom-context-2d-transformation">current transformation
+   <li><p>Transform all the coordinates and lines in <var title="">glyph subpaths</var> by the <a href="#transformations" title="dom-context-2d-transformation">current transformation
    matrix</a> of the <code><a href="#path">Path</a></code> object.</li>
 
    <li><p>Let (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) be the last point in the
@@ -2060,8 +2091,7 @@
      These subpaths in <var title="">glyph subpaths</var> must also
      all wind clockwise.</p>
 
-     <li><p>Transform all the coordinates in <var title="">glyph
-     subpaths</var> by the <a href="#transformations" title="dom-context-2d-transformation">current transformation
+     <li><p>Transform all the coordinates and lines in <var title="">glyph subpaths</var> by the <a href="#transformations" title="dom-context-2d-transformation">current transformation
      matrix</a> of <var title="">target</var>.</li>
 
      <li><p>Let (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) be the last point in
@@ -3969,6 +3999,14 @@
    graphics</cite>, volume 18, number 3, pp. 253-259. ACM Press, July
    1984.</dd>
 
+   <dt id="refsSVG">[SVG]</dt>
+   <dd><cite><a href="http://www.w3.org/TR/SVGTiny12/">Scalable Vector
+   Graphics (SVG) Tiny 1.2 Specification</a></cite>, O. Andersson,
+   R. Berjon, E. Dahlstr&ouml;m, A. Emmons, J. Ferraiolo, A. Grasso,
+   V. Hardy, S. Hayman, D. Jackson, C. Lilley, C. McCormack,
+   A. Neumann, C. Northway, A. Quint, N. Ramani, D. Schepers,
+   A. Shellshear. W3C.</dd>
+
    <dt id="refsTYPEDARRAY">[TYPEDARRAY]</dt>
    <dd><cite><a href="http://www.khronos.org/registry/typedarray/specs/latest/">Typed Array Specification</a></cite>, D. Herman, K. Russell. Khronos.</dd>
 

Received on Tuesday, 13 March 2012 22:46:43 UTC