W3C home > Mailing lists > Public > public-html-commits@w3.org > December 2010

html5/2dcontext Overview.html,1.91,1.92

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 07 Dec 2010 20:57:01 +0000
To: public-html-commits@w3.org
Message-Id: <E1PQ4ar-0004ro-VJ@lionel-hutz.w3.org>
Update of /sources/public/html5/2dcontext
In directory hutz:/tmp/cvs-serv18687

Modified Files:
	Overview.html 
Log Message:
<canvas> drawImage() and pattern filtering issue (whatwg r5708)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/2dcontext/Overview.html,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- Overview.html	29 Nov 2010 22:56:56 -0000	1.91
+++ Overview.html	7 Dec 2010 20:56:59 -0000	1.92
@@ -1368,6 +1368,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,
@@ -2773,10 +2784,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 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>
@@ -2803,6 +2810,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,
Received on Tuesday, 7 December 2010 20:57:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 7 December 2010 20:57:05 GMT