[html5] r1739 - /

whatwg at whatwg.org whatwg at whatwg.org
Tue Jun 10 15:28:40 PDT 2008


Author: ianh
Date: 2008-06-10 15:28:40 -0700 (Tue, 10 Jun 2008)
New Revision: 1739

Modified:
   index
   source
Log:
[] (0) define the rounding behaviour of createImageData() to be like that of getID() and putID().

Modified: index
===================================================================
--- index	2008-06-10 21:31:27 UTC (rev 1738)
+++ index	2008-06-10 22:28:40 UTC (rev 1739)
@@ -20183,11 +20183,20 @@
 
   <pre>context.putImageData(context.getImageData(x, y, w, h), x, y);</pre>
 
-  <p>...for any value of <var title="">x</var> and <var title="">y</var>. In
-   other words, while user agents may round the arguments of the two methods
-   so that they map to device pixel boundaries, any rounding performed must
-   be performed consistently for both the <code
+  <p>...for any value of <var title="">x</var> and <var title="">y</var>, and
+   the following two calls:
+
+  <pre>context.createImageData(w, h);
+context.getImageData(0, 0, w, h);</pre>
+
+  <p>...must return <code><a href="#imagedata">ImageData</a></code> objects
+   with the same dimensions, for any value of <var title="">w</var> and <var
+   title="">h</var>. In other words, while user agents may round the
+   arguments of these methods so that they map to device pixel boundaries,
+   any rounding performed must be performed consistently for all of the <code
    title=dom-context-2d-getImageData><a
+   href="#getimagedata">createImageData()</a></code>, <code
+   title=dom-context-2d-getImageData><a
    href="#getimagedata">getImageData()</a></code> and <code
    title=dom-context-2d-putImageData><a
    href="#putimagedata">putImageData()</a></code> operations.

Modified: source
===================================================================
--- source	2008-06-10 21:31:27 UTC (rev 1738)
+++ source	2008-06-10 22:28:40 UTC (rev 1739)
@@ -17870,10 +17870,18 @@
   <pre>context.putImageData(context.getImageData(x, y, w, h), x, y);</pre>
 
   <p>...for any value of <var title="">x</var> and <var
-  title="">y</var>. In other words, while user agents may round the
-  arguments of the two methods so that they map to device pixel
+  title="">y</var>, and the following two calls:</p>
+
+  <pre>context.createImageData(w, h);
+context.getImageData(0, 0, w, h);</pre>
+
+  <p>...must return <code>ImageData</code> objects with the same
+  dimensions, for any value of <var title="">w</var> and <var
+  title="">h</var>. In other words, while user agents may round the
+  arguments of these methods so that they map to device pixel
   boundaries, any rounding performed must be performed consistently
-  for both the <code
+  for all of the <code
+  title="dom-context-2d-getImageData">createImageData()</code>, <code
   title="dom-context-2d-getImageData">getImageData()</code> and <code
   title="dom-context-2d-putImageData">putImageData()</code>
   operations.</p>




More information about the Commit-Watchers mailing list