[html5] r8539 - [giow] (0) Add a constructor for Path that creates unions of paths according to [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Mar 12 15:14:48 PDT 2014


Author: ianh
Date: 2014-03-12 15:14:47 -0700 (Wed, 12 Mar 2014)
New Revision: 8539

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Add a constructor for Path that creates unions of paths according to a fill rule
Affected topics: Canvas

Modified: complete.html
===================================================================
--- complete.html	2014-03-12 22:01:04 UTC (rev 8538)
+++ complete.html	2014-03-12 22:14:47 UTC (rev 8539)
@@ -54735,6 +54735,7 @@
 
 [<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> <span title=dom-HitRegionOptions-fillRule>fillRule</span> = "<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);
@@ -56615,6 +56616,14 @@
 
    </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>
+
+   <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>
+
+   </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>
 
    <dd>
@@ -56661,7 +56670,57 @@
   when invoked, must return a newly created <code><a href=#path>Path</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-withdata title=dom-Path-withdata><code>Path(<var title="">d</var>)</code></dfn> constructor
+  <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
+  steps:</p>
+
+  <ol><li>
+
+    <p>Run the appropriate step from the following list, based on the constructor's sectond
+    argument:</p>
+
+    <dl class=switch><dd>If it is "nonzero"</dd>
+
+     <dd>
+
+      <p>Let <var title="">merged path</var> be a <a href=#concept-path title=concept-path>path</a> that
+      consists of a set of non-overlapping subpaths that exactly outline the points from which, in
+      any of the <a href=#concept-path title=concept-path>paths</a> provided in the constructor's first
+      argument, the number of times a half-infinite straight line drawn from that point crosses a
+      subpath going in one direction is not equal to the number of times it crosses a subpath going
+      in the other direction.</p>
+
+     </dd>
+
+     <dd>If it is "evenodd"</dd>
+
+     <dd>
+
+      <p>Let <var title="">merged path</var> be a <a href=#concept-path title=concept-path>path</a> that
+      consists of a set of non-overlapping subpaths that exactly outline the points from which, in
+      any of the <a href=#concept-path title=concept-path>paths</a> provided in the constructor's first
+      argument, the number of times a half-infinite straight line drawn from that point crosses that
+      path is odd.</p>
+
+     </dd>
+
+    </dl><p>The subpaths in <var title="">merged path</var> must be oriented such that for any point,
+    the number of times a half-infinite straight line drawn from that point crosses a subpath is
+    even if and only if the number of times a half-infinite straight line drawn from that same point
+    crosses a subpath going in one direction is equal to the number of times it crosses a subpath
+    going in the other direction.</p>
+
+   </li>
+
+   <li><p>Let (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) be the last point in the last subpath of <var title="">merged
+   path</var>.</li>
+
+   <li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path>Path</a></code>
+   object.</li>
+
+   <li><p>Create a new subpath in the <code><a href=#path>Path</a></code> object with (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) as the only point
+   in the subpath.</li>
+
+  </ol><hr><p>The <dfn id=dom-path-withdata title=dom-Path-withdata><code>Path(<var title="">d</var>)</code></dfn> constructor
   must run the following steps:</p>
 
   <ol><li>

Modified: index
===================================================================
--- index	2014-03-12 22:01:04 UTC (rev 8538)
+++ index	2014-03-12 22:14:47 UTC (rev 8539)
@@ -54735,6 +54735,7 @@
 
 [<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> <span title=dom-HitRegionOptions-fillRule>fillRule</span> = "<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);
@@ -56615,6 +56616,14 @@
 
    </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>
+
+   <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>
+
+   </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>
 
    <dd>
@@ -56661,7 +56670,57 @@
   when invoked, must return a newly created <code><a href=#path>Path</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-withdata title=dom-Path-withdata><code>Path(<var title="">d</var>)</code></dfn> constructor
+  <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
+  steps:</p>
+
+  <ol><li>
+
+    <p>Run the appropriate step from the following list, based on the constructor's sectond
+    argument:</p>
+
+    <dl class=switch><dd>If it is "nonzero"</dd>
+
+     <dd>
+
+      <p>Let <var title="">merged path</var> be a <a href=#concept-path title=concept-path>path</a> that
+      consists of a set of non-overlapping subpaths that exactly outline the points from which, in
+      any of the <a href=#concept-path title=concept-path>paths</a> provided in the constructor's first
+      argument, the number of times a half-infinite straight line drawn from that point crosses a
+      subpath going in one direction is not equal to the number of times it crosses a subpath going
+      in the other direction.</p>
+
+     </dd>
+
+     <dd>If it is "evenodd"</dd>
+
+     <dd>
+
+      <p>Let <var title="">merged path</var> be a <a href=#concept-path title=concept-path>path</a> that
+      consists of a set of non-overlapping subpaths that exactly outline the points from which, in
+      any of the <a href=#concept-path title=concept-path>paths</a> provided in the constructor's first
+      argument, the number of times a half-infinite straight line drawn from that point crosses that
+      path is odd.</p>
+
+     </dd>
+
+    </dl><p>The subpaths in <var title="">merged path</var> must be oriented such that for any point,
+    the number of times a half-infinite straight line drawn from that point crosses a subpath is
+    even if and only if the number of times a half-infinite straight line drawn from that same point
+    crosses a subpath going in one direction is equal to the number of times it crosses a subpath
+    going in the other direction.</p>
+
+   </li>
+
+   <li><p>Let (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) be the last point in the last subpath of <var title="">merged
+   path</var>.</li>
+
+   <li><p>Add all the subpaths in <var title="">merged path</var> to the <code><a href=#path>Path</a></code>
+   object.</li>
+
+   <li><p>Create a new subpath in the <code><a href=#path>Path</a></code> object with (<var title="">x<sub title="">final</sub></var>, <var title="">y<sub title="">final</sub></var>) as the only point
+   in the subpath.</li>
+
+  </ol><hr><p>The <dfn id=dom-path-withdata title=dom-Path-withdata><code>Path(<var title="">d</var>)</code></dfn> constructor
   must run the following steps:</p>
 
   <ol><li>

Modified: source
===================================================================
--- source	2014-03-12 22:01:04 UTC (rev 8538)
+++ source	2014-03-12 22:14:47 UTC (rev 8539)
@@ -60612,6 +60612,7 @@
 
 [<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> <span data-x="dom-HitRegionOptions-fillRule">fillRule</span> = "<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);
@@ -62820,6 +62821,14 @@
 
    </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>
+
+   <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>
+
+   </dd>
+
    <dt><var data-x="">path</var> = new <code data-x="dom-Path-withdata">Path</code>(<var data-x="">d</var>)</dt>
 
    <dd>
@@ -62874,6 +62883,69 @@
 
   <hr>
 
+  <p>The <dfn data-x="dom-Path-merge"><code>Path(<var data-x="">paths</var>, <var
+  data-x="">fillRule</var>)</code></dfn> constructor, when invoked, must run the following
+  steps:</p>
+
+  <ol>
+
+   <li>
+
+    <p>Run the appropriate step from the following list, based on the constructor's sectond
+    argument:</p>
+
+    <dl class="switch">
+
+     <dd>If it is "nonzero"</dd>
+
+     <dd>
+
+      <p>Let <var data-x="">merged path</var> be a <span data-x="concept-path">path</span> that
+      consists of a set of non-overlapping subpaths that exactly outline the points from which, in
+      any of the <span data-x="concept-path">paths</span> provided in the constructor's first
+      argument, the number of times a half-infinite straight line drawn from that point crosses a
+      subpath going in one direction is not equal to the number of times it crosses a subpath going
+      in the other direction.</p>
+
+     </dd>
+
+     <dd>If it is "evenodd"</dd>
+
+     <dd>
+
+      <p>Let <var data-x="">merged path</var> be a <span data-x="concept-path">path</span> that
+      consists of a set of non-overlapping subpaths that exactly outline the points from which, in
+      any of the <span data-x="concept-path">paths</span> provided in the constructor's first
+      argument, the number of times a half-infinite straight line drawn from that point crosses that
+      path is odd.</p>
+
+     </dd>
+
+    </dl>
+
+    <p>The subpaths in <var data-x="">merged path</var> must be oriented such that for any point,
+    the number of times a half-infinite straight line drawn from that point crosses a subpath is
+    even if and only if the number of times a half-infinite straight line drawn from that same point
+    crosses a subpath going in one direction is equal to the number of times it crosses a subpath
+    going in the other direction.</p>
+
+   </li>
+
+   <li><p>Let (<var data-x="">x<sub data-x="">final</sub></var>, <var data-x="">y<sub
+   data-x="">final</sub></var>) be the last point in the last subpath of <var data-x="">merged
+   path</var>.</p></li>
+
+   <li><p>Add all the subpaths in <var data-x="">merged path</var> to the <code>Path</code>
+   object.</p></li>
+
+   <li><p>Create a new subpath in the <code>Path</code> object with (<var data-x="">x<sub
+   data-x="">final</sub></var>, <var data-x="">y<sub data-x="">final</sub></var>) as the only point
+   in the subpath.</p></li>
+
+  </ol>
+
+  <hr>
+
   <p>The <dfn data-x="dom-Path-withdata"><code>Path(<var data-x="">d</var>)</code></dfn> constructor
   must run the following steps:</p>
 




More information about the Commit-Watchers mailing list