[html5] r5708 - [giow] (2) <canvas> drawImage() and pattern filtering issue Fixing http://www.w3 [...]
whatwg at whatwg.org
whatwg at whatwg.org
Tue Dec 7 12:56:56 PST 2010
Author: ianh
Date: 2010-12-07 12:56:55 -0800 (Tue, 07 Dec 2010)
New Revision: 5708
Modified:
complete.html
index
source
Log:
[giow] (2) <canvas> drawImage() and pattern filtering issue
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10799
Modified: complete.html
===================================================================
--- complete.html 2010-12-07 02:52:43 UTC (rev 5707)
+++ complete.html 2010-12-07 20:56:55 UTC (rev 5708)
@@ -32033,6 +32033,17 @@
stroking or filling effect requires that they be drawn, and are
affected by the current transformation matrix.</p>
+ <p>If the original image data is a bitmap image, the value painted
+ at a point in the area of the repetitions is computed by filtering
+ the original image data. The user agent may use any filtering
+ algorithm (for example bilinear interpolation or nearest-neighbor).
+ When the filtering algorithm requires a pixel value from outside the
+ original image data, it must instead use the value from wrapping the
+ pixel's coordinates to the original image's dimensions. (That is,
+ the filter uses 'repeat' behavior, regardless of the value of
+ <var title="">repetition</var>.)
+ <!-- drawImage() has a similar paragraph with different rules -->
+
<p>When the <code title=dom-context-2d-createPattern><a href=#dom-context-2d-createpattern>createPattern()</a></code> method
is passed an animated image as its <var title="">image</var>
argument, the user agent must use the poster frame of the animation,
@@ -33509,10 +33520,6 @@
arguments is zero, the implementation must raise an
<code><a href=#index_size_err>INDEX_SIZE_ERR</a></code> exception.</p>
- <p>Pixels of the source rectangle that are not entirely within the
- source image must be treated as transparent black.</p> <!-- see
- CORE-32111 http://krijnhoetmer.nl/irc-logs/whatwg/20100818#l-737 -->
-
<p>The destination rectangle is the rectangle whose corners are the
four points (<var title="">dx</var>, <var title="">dy</var>),
(<span title=""><var title="">dx</var>+<var title="">dw</var></span>, <var title="">dy</var>), (<span title=""><var title="">dx</var>+<var title="">dw</var></span>, <span title=""><var title="">dy</var>+<var title="">dh</var></span>), (<var title="">dx</var>, <span title=""><var title="">dy</var>+<var title="">dh</var></span>).</p>
@@ -33539,6 +33546,19 @@
back onto the canvas, so it is possible to copy parts of a canvas
onto overlapping parts of itself.</p>
+ <p>If the original image data is a bitmap image, the value painted
+ at a point in the destination rectangle is computed by filtering the
+ original image data. The user agent may use any filtering algorithm
+ (for example bilinear interpolation or nearest-neighbor). When the
+ filtering algorithm requires a pixel value from outside the original
+ image data, it must instead use the value from the nearest edge
+ pixel. (That is, the filter uses 'clamp-to-edge' behavior.)</p>
+ <!-- see CORE-32111 and:
+ http://krijnhoetmer.nl/irc-logs/whatwg/20100818#l-737
+ http://www.w3.org/Bugs/Public/show_bug.cgi?id=10799#c11
+ -->
+ <!-- createPattern() has a similar paragraph with different rules -->
+
<p>When the <code title=dom-context-2d-drawImage><a href=#dom-context-2d-drawimage>drawImage()</a></code> method
is passed an animated image as its <var title="">image</var>
argument, the user agent must use the poster frame of the animation,
Modified: index
===================================================================
--- index 2010-12-07 02:52:43 UTC (rev 5707)
+++ index 2010-12-07 20:56:55 UTC (rev 5708)
@@ -32014,6 +32014,17 @@
stroking or filling effect requires that they be drawn, and are
affected by the current transformation matrix.</p>
+ <p>If the original image data is a bitmap image, the value painted
+ at a point in the area of the repetitions is computed by filtering
+ the original image data. The user agent may use any filtering
+ algorithm (for example bilinear interpolation or nearest-neighbor).
+ When the filtering algorithm requires a pixel value from outside the
+ original image data, it must instead use the value from wrapping the
+ pixel's coordinates to the original image's dimensions. (That is,
+ the filter uses 'repeat' behavior, regardless of the value of
+ <var title="">repetition</var>.)
+ <!-- drawImage() has a similar paragraph with different rules -->
+
<p>When the <code title=dom-context-2d-createPattern><a href=#dom-context-2d-createpattern>createPattern()</a></code> method
is passed an animated image as its <var title="">image</var>
argument, the user agent must use the poster frame of the animation,
@@ -33490,10 +33501,6 @@
arguments is zero, the implementation must raise an
<code><a href=#index_size_err>INDEX_SIZE_ERR</a></code> exception.</p>
- <p>Pixels of the source rectangle that are not entirely within the
- source image must be treated as transparent black.</p> <!-- see
- CORE-32111 http://krijnhoetmer.nl/irc-logs/whatwg/20100818#l-737 -->
-
<p>The destination rectangle is the rectangle whose corners are the
four points (<var title="">dx</var>, <var title="">dy</var>),
(<span title=""><var title="">dx</var>+<var title="">dw</var></span>, <var title="">dy</var>), (<span title=""><var title="">dx</var>+<var title="">dw</var></span>, <span title=""><var title="">dy</var>+<var title="">dh</var></span>), (<var title="">dx</var>, <span title=""><var title="">dy</var>+<var title="">dh</var></span>).</p>
@@ -33520,6 +33527,19 @@
back onto the canvas, so it is possible to copy parts of a canvas
onto overlapping parts of itself.</p>
+ <p>If the original image data is a bitmap image, the value painted
+ at a point in the destination rectangle is computed by filtering the
+ original image data. The user agent may use any filtering algorithm
+ (for example bilinear interpolation or nearest-neighbor). When the
+ filtering algorithm requires a pixel value from outside the original
+ image data, it must instead use the value from the nearest edge
+ pixel. (That is, the filter uses 'clamp-to-edge' behavior.)</p>
+ <!-- see CORE-32111 and:
+ http://krijnhoetmer.nl/irc-logs/whatwg/20100818#l-737
+ http://www.w3.org/Bugs/Public/show_bug.cgi?id=10799#c11
+ -->
+ <!-- createPattern() has a similar paragraph with different rules -->
+
<p>When the <code title=dom-context-2d-drawImage><a href=#dom-context-2d-drawimage>drawImage()</a></code> method
is passed an animated image as its <var title="">image</var>
argument, the user agent must use the poster frame of the animation,
Modified: source
===================================================================
--- source 2010-12-07 02:52:43 UTC (rev 5707)
+++ source 2010-12-07 20:56:55 UTC (rev 5708)
@@ -35254,6 +35254,17 @@
stroking or filling effect requires that they be drawn, and are
affected by the current transformation matrix.</p>
+ <p>If the original image data is a bitmap image, the value painted
+ at a point in the area of the repetitions is computed by filtering
+ the original image data. The user agent may use any filtering
+ algorithm (for example bilinear interpolation or nearest-neighbor).
+ When the filtering algorithm requires a pixel value from outside the
+ original image data, it must instead use the value from wrapping the
+ pixel's coordinates to the original image's dimensions. (That is,
+ the filter uses 'repeat' behavior, regardless of the value of
+ <var title="">repetition</var>.)
+ <!-- drawImage() has a similar paragraph with different rules -->
+
<p>When the <code
title="dom-context-2d-createPattern">createPattern()</code> method
is passed an animated image as its <var title="">image</var>
@@ -37009,10 +37020,6 @@
arguments is zero, the implementation must raise an
<code>INDEX_SIZE_ERR</code> exception.</p>
- <p>Pixels of the source rectangle that are not entirely within the
- source image must be treated as transparent black.</p> <!-- see
- CORE-32111 http://krijnhoetmer.nl/irc-logs/whatwg/20100818#l-737 -->
-
<p>The destination rectangle is the rectangle whose corners are the
four points (<var title="">dx</var>, <var title="">dy</var>),
(<span title=""><var title="">dx</var>+<var title="">dw</var></span>, <var
@@ -37046,6 +37053,19 @@
back onto the canvas, so it is possible to copy parts of a canvas
onto overlapping parts of itself.</p>
+ <p>If the original image data is a bitmap image, the value painted
+ at a point in the destination rectangle is computed by filtering the
+ original image data. The user agent may use any filtering algorithm
+ (for example bilinear interpolation or nearest-neighbor). When the
+ filtering algorithm requires a pixel value from outside the original
+ image data, it must instead use the value from the nearest edge
+ pixel. (That is, the filter uses 'clamp-to-edge' behavior.)</p>
+ <!-- see CORE-32111 and:
+ http://krijnhoetmer.nl/irc-logs/whatwg/20100818#l-737
+ http://www.w3.org/Bugs/Public/show_bug.cgi?id=10799#c11
+ -->
+ <!-- createPattern() has a similar paragraph with different rules -->
+
<p>When the <code
title="dom-context-2d-drawImage">drawImage()</code> method
is passed an animated image as its <var title="">image</var>
More information about the Commit-Watchers
mailing list