[html5] r7032 - [giow] (0) Add a way to reset the clipping region without affecting the stack Af [...]
whatwg at whatwg.org
whatwg at whatwg.org
Tue Mar 27 15:24:27 PDT 2012
Author: ianh
Date: 2012-03-27 15:24:26 -0700 (Tue, 27 Mar 2012)
New Revision: 7032
Modified:
complete.html
index
source
Log:
[giow] (0) Add a way to reset the clipping region without affecting the stack
Affected topics: Canvas
Modified: complete.html
===================================================================
--- complete.html 2012-03-27 22:06:08 UTC (rev 7031)
+++ complete.html 2012-03-27 22:24:26 UTC (rev 7032)
@@ -34947,6 +34947,7 @@
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-clip title=dom-context-2d-clip>clip</a>();
void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(<a href=#path>Path</a> path);
+ 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>(double x, double y);
boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(<a href=#path>Path</a> path, double x, double y);
@@ -37299,8 +37300,8 @@
<span title="">(<var title="">x</var>, <span title=""><var title="">y</var>+<var title="">h</var></span>)</span>.</p>
<p>Shapes are painted without affecting the <a href=#current-default-path>current default
- path</a>, and are subject to the <a href=#clipping-region title="clipping
- region">clipping region</a>, and, with the exception of <code title=dom-context-2d-clearRect><a href=#dom-context-2d-clearrect>clearRect()</a></code>, also <a href=#shadows title=shadows>shadow effects</a>, <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
+ path</a>, and are subject to the <a href=#clipping-region>clipping region</a>,
+ and, with the exception of <code title=dom-context-2d-clearRect><a href=#dom-context-2d-clearrect>clearRect()</a></code>, also <a href=#shadows title=shadows>shadow effects</a>, <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
operators</a>.</p>
</div>
@@ -37333,9 +37334,9 @@
<p>The <dfn id=dom-context-2d-clearrect title=dom-context-2d-clearRect><code>clearRect(<var title="">x</var>, <var title="">y</var>, <var title="">w</var>, <var title="">h</var>)</code></dfn> method must run the following steps:</p>
- <ol><li><p>Let <var title="">pixels</var> be the set of pixels in
- the specified rectangle that also intersect the current clipping
- region.</li>
+ <ol><li><p>Let <var title="">pixels</var> be the set of pixels in the
+ specified rectangle that also intersect the current <a href=#clipping-region>clipping
+ region</a>.</li>
<li><p>Clear the pixels in <var title="">pixels</var> to a fully
transparent black, erasing any previous image.</li>
@@ -37443,7 +37444,7 @@
<p>These shapes are painted without affecting the current path,
and are 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 title="clipping region">clipping region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
+ <a href=#clipping-region>clipping region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
operators</a>.</p>
</li>
@@ -37592,8 +37593,8 @@
<p>Text is painted without affecting the current path, and is
subject to <span title="shadows">shadow effects</span>, <span
- title="dom-context-2d-globalAlpha">global alpha</span>, the <span
- title="clipping region">clipping region</span>, and <span
+ title="dom-context-2d-globalAlpha">global alpha</span>, the
+ <span>clipping region</span>, and <span
title="dom-context-2d-globalCompositeOperation">global composition
operators</span>.</p>
@@ -37639,8 +37640,9 @@
width). This version of the specification does not provide a way to
obtain the bounding box dimensions of the text. If the text is to be
rendered and removed, care needs to be taken to replace the entire
- area of the canvas that the clipping region covers, not just the box
- given by the em square height and measured text width.</p>
+ area of the canvas that the <a href=#clipping-region>clipping region</a> covers, not
+ just the box given by the em square height and measured text
+ width.</p>
</div>
@@ -37706,7 +37708,8 @@
<p>If the given element is focused, and the user has configured
his system to draw focus rings in a particular manner (for
example, high contrast focus rings), draws a focus ring around the
- <a href=#current-default-path>current default path</a> or the given path and returns false.</p>
+ <a href=#current-default-path>current default path</a> or the given path and returns
+ false.</p>
<p>Otherwise, returns true if the given element is focused, and
false otherwise. This can thus be used to determine when to draw a
@@ -37721,9 +37724,9 @@
<dd>
- <p>Scrolls the <a href=#current-default-path>current default path</a> into view. This is especially
- useful on devices with small screens, where the whole canvas might
- not be visible at once.</p>
+ <p>Scrolls the <a href=#current-default-path>current default path</a> or the given path
+ into view. This is especially useful on devices with small
+ screens, where the whole canvas might not be visible at once.</p>
</dd>
@@ -37733,11 +37736,21 @@
<dd>
- <p>Further constrains the clipping region to the <a href=#current-default-path>current default path</a>.</p>
+ <p>Further constrains the clipping region to the <a href=#current-default-path>current
+ default path</a> or the given path.</p>
</dd>
+ <dt><var title="">context</var> . <code title=dom-context-2d-resetClip><a href=#dom-context-2d-resetclip>resetClip</a></code>()</dt>
+
+ <dd>
+
+ <p>Unconstrains the clipping region.</p>
+
+ </dd>
+
+
<dt><var title="">context</var> . <code title=dom-context-2d-isPointInPath><a href=#dom-context-2d-ispointinpath>isPointInPath</a></code>(<var title="">x</var>, <var title="">y</var>)</dt>
<dt><var title="">context</var> . <code title=dom-context-2d-isPointInPath><a href=#dom-context-2d-ispointinpath>isPointInPath</a></code>(<var title="">path</var>, <var title="">x</var>, <var title="">y</var>)</dt>
@@ -37797,8 +37810,7 @@
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
effects</a>, <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global
- alpha</a>, the <a href=#clipping-region title="clipping region">clipping
- region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
+ 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 is being used.)</p>
@@ -37833,9 +37845,9 @@
<p>The focus ring should not be subject to the <a href=#shadows title=shadows>shadow effects</a>, the <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, or the
<a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global
composition operators</a>, but <em>should</em> be subject to
- the <a href=#clipping-region title="clipping region">clipping region</a>. (The
- effect of transformations is described above and varies based on
- which path is being used.)</p>
+ the <a href=#clipping-region>clipping region</a>. (The effect of transformations
+ is described above and varies based on which path is being
+ used.)</p>
</li>
@@ -37865,9 +37877,9 @@
<p>The focus ring should not be subject to the <a href=#shadows title=shadows>shadow effects</a>, the <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, or the
<a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global
composition operators</a>, but <em>should</em> be subject to
- the <a href=#clipping-region title="clipping region">clipping region</a>. (The
- effect of transformations is described above and varies based on
- which path is being used.)</p>
+ the <a href=#clipping-region>clipping region</a>. (The effect of transformations
+ is described above and varies based on which path is being
+ used.)</p>
</li>
@@ -37931,11 +37943,13 @@
- also "add", "subtract", "replace", "intersect" and "xor"
- maybe just support creating unions, intersections, and other -ions of paths
-->
- <!-- v5
- Jordan OSETE suggests:
- * support ways of resetting the clipping region without save/restore
- -->
+ <p>The <dfn id=dom-context-2d-resetclip title=dom-context-2d-resetClip><code>resetClip()</code></dfn>
+ method must create a new <a href=#clipping-region>clipping region</a> that is the
+ rectangle with the top left corner at (0,0) and the width and height
+ of the coordinate space. The new clipping region replaces the
+ current clipping region.</p>
+
<hr><p>The <dfn id=dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath><code>isPointInPath(<var title="">x</var>, <var title="">y</var>)</code></dfn> method must
return true if the point given by the <var title="">x</var> and <var title="">y</var> coordinates passed to the method, when treated as
coordinates in the canvas coordinate space unaffected by the current
@@ -38187,7 +38201,8 @@
<!-- createPattern() has an equivalent paragraph -->
<p>Images are painted without affecting the current path, and are
- 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 title="clipping region">clipping region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
+ 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>.</p>
<p>The <dfn id=dom-context-2d-imagesmoothingenabled title=dom-context-2d-imageSmoothingEnabled><code>imageSmoothingEnabled</code></dfn>
@@ -39068,7 +39083,8 @@
different values.</p>
<p>The current path, <a href=#transformations title=dom-context-2d-transformation>transformation matrix</a>,
- <a href=#shadows title=shadows>shadow attributes</a>, <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, the <a href=#clipping-region title="clipping region">clipping region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
+ <a href=#shadows title=shadows>shadow attributes</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
operator</a> must not affect the <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code> and <code title=dom-context-2d-putImageData><a href=#dom-context-2d-putimagedata>putImageData()</a></code>
methods.</p>
Modified: index
===================================================================
--- index 2012-03-27 22:06:08 UTC (rev 7031)
+++ index 2012-03-27 22:24:26 UTC (rev 7032)
@@ -34947,6 +34947,7 @@
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-clip title=dom-context-2d-clip>clip</a>();
void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(<a href=#path>Path</a> path);
+ 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>(double x, double y);
boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(<a href=#path>Path</a> path, double x, double y);
@@ -37299,8 +37300,8 @@
<span title="">(<var title="">x</var>, <span title=""><var title="">y</var>+<var title="">h</var></span>)</span>.</p>
<p>Shapes are painted without affecting the <a href=#current-default-path>current default
- path</a>, and are subject to the <a href=#clipping-region title="clipping
- region">clipping region</a>, and, with the exception of <code title=dom-context-2d-clearRect><a href=#dom-context-2d-clearrect>clearRect()</a></code>, also <a href=#shadows title=shadows>shadow effects</a>, <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
+ path</a>, and are subject to the <a href=#clipping-region>clipping region</a>,
+ and, with the exception of <code title=dom-context-2d-clearRect><a href=#dom-context-2d-clearrect>clearRect()</a></code>, also <a href=#shadows title=shadows>shadow effects</a>, <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
operators</a>.</p>
</div>
@@ -37333,9 +37334,9 @@
<p>The <dfn id=dom-context-2d-clearrect title=dom-context-2d-clearRect><code>clearRect(<var title="">x</var>, <var title="">y</var>, <var title="">w</var>, <var title="">h</var>)</code></dfn> method must run the following steps:</p>
- <ol><li><p>Let <var title="">pixels</var> be the set of pixels in
- the specified rectangle that also intersect the current clipping
- region.</li>
+ <ol><li><p>Let <var title="">pixels</var> be the set of pixels in the
+ specified rectangle that also intersect the current <a href=#clipping-region>clipping
+ region</a>.</li>
<li><p>Clear the pixels in <var title="">pixels</var> to a fully
transparent black, erasing any previous image.</li>
@@ -37443,7 +37444,7 @@
<p>These shapes are painted without affecting the current path,
and are 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 title="clipping region">clipping region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
+ <a href=#clipping-region>clipping region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
operators</a>.</p>
</li>
@@ -37592,8 +37593,8 @@
<p>Text is painted without affecting the current path, and is
subject to <span title="shadows">shadow effects</span>, <span
- title="dom-context-2d-globalAlpha">global alpha</span>, the <span
- title="clipping region">clipping region</span>, and <span
+ title="dom-context-2d-globalAlpha">global alpha</span>, the
+ <span>clipping region</span>, and <span
title="dom-context-2d-globalCompositeOperation">global composition
operators</span>.</p>
@@ -37639,8 +37640,9 @@
width). This version of the specification does not provide a way to
obtain the bounding box dimensions of the text. If the text is to be
rendered and removed, care needs to be taken to replace the entire
- area of the canvas that the clipping region covers, not just the box
- given by the em square height and measured text width.</p>
+ area of the canvas that the <a href=#clipping-region>clipping region</a> covers, not
+ just the box given by the em square height and measured text
+ width.</p>
</div>
@@ -37706,7 +37708,8 @@
<p>If the given element is focused, and the user has configured
his system to draw focus rings in a particular manner (for
example, high contrast focus rings), draws a focus ring around the
- <a href=#current-default-path>current default path</a> or the given path and returns false.</p>
+ <a href=#current-default-path>current default path</a> or the given path and returns
+ false.</p>
<p>Otherwise, returns true if the given element is focused, and
false otherwise. This can thus be used to determine when to draw a
@@ -37721,9 +37724,9 @@
<dd>
- <p>Scrolls the <a href=#current-default-path>current default path</a> into view. This is especially
- useful on devices with small screens, where the whole canvas might
- not be visible at once.</p>
+ <p>Scrolls the <a href=#current-default-path>current default path</a> or the given path
+ into view. This is especially useful on devices with small
+ screens, where the whole canvas might not be visible at once.</p>
</dd>
@@ -37733,11 +37736,21 @@
<dd>
- <p>Further constrains the clipping region to the <a href=#current-default-path>current default path</a>.</p>
+ <p>Further constrains the clipping region to the <a href=#current-default-path>current
+ default path</a> or the given path.</p>
</dd>
+ <dt><var title="">context</var> . <code title=dom-context-2d-resetClip><a href=#dom-context-2d-resetclip>resetClip</a></code>()</dt>
+
+ <dd>
+
+ <p>Unconstrains the clipping region.</p>
+
+ </dd>
+
+
<dt><var title="">context</var> . <code title=dom-context-2d-isPointInPath><a href=#dom-context-2d-ispointinpath>isPointInPath</a></code>(<var title="">x</var>, <var title="">y</var>)</dt>
<dt><var title="">context</var> . <code title=dom-context-2d-isPointInPath><a href=#dom-context-2d-ispointinpath>isPointInPath</a></code>(<var title="">path</var>, <var title="">x</var>, <var title="">y</var>)</dt>
@@ -37797,8 +37810,7 @@
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
effects</a>, <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global
- alpha</a>, the <a href=#clipping-region title="clipping region">clipping
- region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
+ 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 is being used.)</p>
@@ -37833,9 +37845,9 @@
<p>The focus ring should not be subject to the <a href=#shadows title=shadows>shadow effects</a>, the <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, or the
<a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global
composition operators</a>, but <em>should</em> be subject to
- the <a href=#clipping-region title="clipping region">clipping region</a>. (The
- effect of transformations is described above and varies based on
- which path is being used.)</p>
+ the <a href=#clipping-region>clipping region</a>. (The effect of transformations
+ is described above and varies based on which path is being
+ used.)</p>
</li>
@@ -37865,9 +37877,9 @@
<p>The focus ring should not be subject to the <a href=#shadows title=shadows>shadow effects</a>, the <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, or the
<a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global
composition operators</a>, but <em>should</em> be subject to
- the <a href=#clipping-region title="clipping region">clipping region</a>. (The
- effect of transformations is described above and varies based on
- which path is being used.)</p>
+ the <a href=#clipping-region>clipping region</a>. (The effect of transformations
+ is described above and varies based on which path is being
+ used.)</p>
</li>
@@ -37931,11 +37943,13 @@
- also "add", "subtract", "replace", "intersect" and "xor"
- maybe just support creating unions, intersections, and other -ions of paths
-->
- <!-- v5
- Jordan OSETE suggests:
- * support ways of resetting the clipping region without save/restore
- -->
+ <p>The <dfn id=dom-context-2d-resetclip title=dom-context-2d-resetClip><code>resetClip()</code></dfn>
+ method must create a new <a href=#clipping-region>clipping region</a> that is the
+ rectangle with the top left corner at (0,0) and the width and height
+ of the coordinate space. The new clipping region replaces the
+ current clipping region.</p>
+
<hr><p>The <dfn id=dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath><code>isPointInPath(<var title="">x</var>, <var title="">y</var>)</code></dfn> method must
return true if the point given by the <var title="">x</var> and <var title="">y</var> coordinates passed to the method, when treated as
coordinates in the canvas coordinate space unaffected by the current
@@ -38187,7 +38201,8 @@
<!-- createPattern() has an equivalent paragraph -->
<p>Images are painted without affecting the current path, and are
- 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 title="clipping region">clipping region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
+ 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>.</p>
<p>The <dfn id=dom-context-2d-imagesmoothingenabled title=dom-context-2d-imageSmoothingEnabled><code>imageSmoothingEnabled</code></dfn>
@@ -39068,7 +39083,8 @@
different values.</p>
<p>The current path, <a href=#transformations title=dom-context-2d-transformation>transformation matrix</a>,
- <a href=#shadows title=shadows>shadow attributes</a>, <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, the <a href=#clipping-region title="clipping region">clipping region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
+ <a href=#shadows title=shadows>shadow attributes</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
operator</a> must not affect the <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code> and <code title=dom-context-2d-putImageData><a href=#dom-context-2d-putimagedata>putImageData()</a></code>
methods.</p>
Modified: source
===================================================================
--- source 2012-03-27 22:06:08 UTC (rev 7031)
+++ source 2012-03-27 22:24:26 UTC (rev 7032)
@@ -40629,6 +40629,7 @@
void <span title="dom-context-2d-scrollPathIntoView">scrollPathIntoView</span>(<span>Path</span> path);
void <span title="dom-context-2d-clip">clip</span>();
void <span title="dom-context-2d-clip">clip</span>(<span>Path</span> path);
+ void <span title="dom-context-2d-resetClip">resetClip</span>();
boolean <span title="dom-context-2d-isPointInPath">isPointInPath</span>(double x, double y);
boolean <span title="dom-context-2d-isPointInPath">isPointInPath</span>(<span>Path</span> path, double x, double y);
@@ -43457,8 +43458,8 @@
title="">h</var></span>)</span>.</p>
<p>Shapes are painted without affecting the <span>current default
- path</span>, and are subject to the <span title="clipping
- region">clipping region</span>, and, with the exception of <code
+ path</span>, and are subject to the <span>clipping region</span>,
+ and, with the exception of <code
title="dom-context-2d-clearRect">clearRect()</code>, also <span
title="shadows">shadow effects</span>, <span
title="dom-context-2d-globalAlpha">global alpha</span>, and <span
@@ -43503,9 +43504,9 @@
<ol>
- <li><p>Let <var title="">pixels</var> be the set of pixels in
- the specified rectangle that also intersect the current clipping
- region.</p></li>
+ <li><p>Let <var title="">pixels</var> be the set of pixels in the
+ specified rectangle that also intersect the current <span>clipping
+ region</span>.</p></li>
<li><p>Clear the pixels in <var title="">pixels</var> to a fully
transparent black, erasing any previous image.</p></li>
@@ -43655,7 +43656,7 @@
<p>These shapes are painted without affecting the current path,
and are subject to <span title="shadows">shadow effects</span>,
<span title="dom-context-2d-globalAlpha">global alpha</span>, the
- <span title="clipping region">clipping region</span>, and <span
+ <span>clipping region</span>, and <span
title="dom-context-2d-globalCompositeOperation">global composition
operators</span>.</p>
@@ -43807,8 +43808,8 @@
<p>Text is painted without affecting the current path, and is
subject to <span title="shadows">shadow effects</span>, <span
- title="dom-context-2d-globalAlpha">global alpha</span>, the <span
- title="clipping region">clipping region</span>, and <span
+ title="dom-context-2d-globalAlpha">global alpha</span>, the
+ <span>clipping region</span>, and <span
title="dom-context-2d-globalCompositeOperation">global composition
operators</span>.</p>
@@ -43862,8 +43863,9 @@
width). This version of the specification does not provide a way to
obtain the bounding box dimensions of the text. If the text is to be
rendered and removed, care needs to be taken to replace the entire
- area of the canvas that the clipping region covers, not just the box
- given by the em square height and measured text width.</p>
+ area of the canvas that the <span>clipping region</span> covers, not
+ just the box given by the em square height and measured text
+ width.</p>
</div>
@@ -43931,7 +43933,8 @@
<p>If the given element is focused, and the user has configured
his system to draw focus rings in a particular manner (for
example, high contrast focus rings), draws a focus ring around the
- <span>current default path</span> or the given path and returns false.</p>
+ <span>current default path</span> or the given path and returns
+ false.</p>
<p>Otherwise, returns true if the given element is focused, and
false otherwise. This can thus be used to determine when to draw a
@@ -43946,9 +43949,9 @@
<dd>
- <p>Scrolls the <span>current default path</span> into view. This is especially
- useful on devices with small screens, where the whole canvas might
- not be visible at once.</p>
+ <p>Scrolls the <span>current default path</span> or the given path
+ into view. This is especially useful on devices with small
+ screens, where the whole canvas might not be visible at once.</p>
</dd>
@@ -43958,11 +43961,21 @@
<dd>
- <p>Further constrains the clipping region to the <span>current default path</span>.</p>
+ <p>Further constrains the clipping region to the <span>current
+ default path</span> or the given path.</p>
</dd>
+ <dt><var title="">context</var> . <code title="dom-context-2d-resetClip">resetClip</code>()</dt>
+
+ <dd>
+
+ <p>Unconstrains the clipping region.</p>
+
+ </dd>
+
+
<dt><var title="">context</var> . <code title="dom-context-2d-isPointInPath">isPointInPath</code>(<var title="">x</var>, <var title="">y</var>)</dt>
<dt><var title="">context</var> . <code title="dom-context-2d-isPointInPath">isPointInPath</code>(<var title="">path</var>, <var title="">x</var>, <var title="">y</var>)</dt>
@@ -44029,8 +44042,7 @@
the <span>current default path</span> or any <code>Path</code>
objects, and must be subject to <span title="shadows">shadow
effects</span>, <span title="dom-context-2d-globalAlpha">global
- alpha</span>, the <span title="clipping region">clipping
- region</span>, and <span
+ alpha</span>, the <span>clipping region</span>, and <span
title="dom-context-2d-globalCompositeOperation">global composition
operators</span>. (The effect of transformations is described above
and varies based on which path is being used.)</p>
@@ -44075,9 +44087,9 @@
title="dom-context-2d-globalAlpha">global alpha</span>, or the
<span title="dom-context-2d-globalCompositeOperation">global
composition operators</span>, but <em>should</em> be subject to
- the <span title="clipping region">clipping region</span>. (The
- effect of transformations is described above and varies based on
- which path is being used.)</p>
+ the <span>clipping region</span>. (The effect of transformations
+ is described above and varies based on which path is being
+ used.)</p>
</li>
@@ -44115,9 +44127,9 @@
title="dom-context-2d-globalAlpha">global alpha</span>, or the
<span title="dom-context-2d-globalCompositeOperation">global
composition operators</span>, but <em>should</em> be subject to
- the <span title="clipping region">clipping region</span>. (The
- effect of transformations is described above and varies based on
- which path is being used.)</p>
+ the <span>clipping region</span>. (The effect of transformations
+ is described above and varies based on which path is being
+ used.)</p>
</li>
@@ -44193,11 +44205,14 @@
- also "add", "subtract", "replace", "intersect" and "xor"
- maybe just support creating unions, intersections, and other -ions of paths
-->
- <!-- v5
- Jordan OSETE suggests:
- * support ways of resetting the clipping region without save/restore
- -->
+ <p>The <dfn
+ title="dom-context-2d-resetClip"><code>resetClip()</code></dfn>
+ method must create a new <span>clipping region</span> that is the
+ rectangle with the top left corner at (0,0) and the width and height
+ of the coordinate space. The new clipping region replaces the
+ current clipping region.</p>
+
<hr>
<p>The <dfn
@@ -44492,8 +44507,8 @@
<p>Images are painted without affecting the current path, and are
subject to <span title="shadows">shadow effects</span>, <span
- title="dom-context-2d-globalAlpha">global alpha</span>, the <span
- title="clipping region">clipping region</span>, and <span
+ title="dom-context-2d-globalAlpha">global alpha</span>, the
+ <span>clipping region</span>, and <span
title="dom-context-2d-globalCompositeOperation">global composition
operators</span>.</p>
@@ -45602,8 +45617,8 @@
<p>The current path, <span
title="dom-context-2d-transformation">transformation matrix</span>,
<span title="shadows">shadow attributes</span>, <span
- title="dom-context-2d-globalAlpha">global alpha</span>, the <span
- title="clipping region">clipping region</span>, and <span
+ title="dom-context-2d-globalAlpha">global alpha</span>, the
+ <span>clipping region</span>, and <span
title="dom-context-2d-globalCompositeOperation">global composition
operator</span> must not affect the <code
title="dom-context-2d-getImageData">getImageData()</code> and <code
More information about the Commit-Watchers
mailing list