HTML5 Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/1758

SVNBugCommentTime (UTC)
1758remove some redundant ImageData stuff2008-06-13 01:47
Index: source
===================================================================
--- source	(revision 1757)
+++ source	(revision 1758)
@@ -17832,13 +17832,6 @@
 
   <h6><dfn>Pixel manipulation</dfn></h6>
 
-<!--
-  <span>ImageData</span> <span title="dom-context-2d-createImageData">createImageData</span>(in float sw, in float sh);
-  <span>ImageData</span> <span title="dom-context-2d-getImageData">getImageData</span>(in float sx, in float sy, in float sw, in float sh);
-  void <span title="dom-context-2d-putImageData">putImageData</span>(in <span>ImageData</span> imagedata, in float dx, in float dy);
-  void <span title="dom-context-2d-putImageData">putImageData</span>(in <span>ImageData</span> imagedata, in float dx, in float dy, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight);
--->
-
   <p>The <dfn
   title="dom-context-2d-createImageData"><code>createImageData(<var
   title="">sw</var>, <var title="">sh</var>)</code></dfn> method must
@@ -17932,11 +17925,9 @@
   <code>ImageData</code> structures back to the canvas.</p>
 
   <p>If the first argument to the method is null or not an
-  <code>ImageData</code> object that was returned by <code
-  title="dom-context-2d-createImageData">createImageData()</code> or
-  <code title="dom-context-2d-getImageData">getImageData()</code> then
-  the <code title="dom-context-2d-putImageData">putImageData()</code>
-  method must raise a <code>TYPE_MISMATCH_ERR</code> exception.</p>
+  <code>ImageData</code> object then the <code
+  title="dom-context-2d-putImageData">putImageData()</code> method
+  must raise a <code>TYPE_MISMATCH_ERR</code> exception.</p>
 
   <p>If any of the arguments to the method are infinite or NaN, the
   method must raise an <code>INDEX_SIZE_ERR</code> exception.</p>
@@ -18087,35 +18078,30 @@
    title="dom-context-2d-getImageData">getImageData()</code> is at the
    resolution of the canvas backing store, which is likely to not be
    one device pixel to each CSS pixel if the display used is a high
-   resolution display. Thus, while one could create an
-   <code>ImageData</code> object, one would not necessarily know what
-   resolution the canvas expected (how many pixels the canvas wants to
-   paint over one coordinate space unit pixel).</p>
+   resolution display.</p>
 
    <p>In the following example, the script first obtains the size of
    the canvas backing store, and then generates a few new
    <code>ImageData</code> objects which can be used.</p>
 
-   <pre>
-  // canvas is a reference to a &lt;canvas> element
-  var context = canvas.getContext('2d');
+   <pre>// canvas is a reference to a &lt;canvas> element
+var context = canvas.getContext('2d');
 
-  // create a blank slate
-  var data = context.createImageData(canvas.width, canvas.height);
+// create a blank slate
+var data = context.createImageData(canvas.width, canvas.height);
 
-  // create some plasma
-  FillPlasma(data, 'green'); // green plasma
+// create some plasma
+FillPlasma(data, 'green'); // green plasma
 
-  // add a cloud to the plasma
-  AddCloud(data, data.width/2, data.height/2); // put a cloud in the middle
+// add a cloud to the plasma
+AddCloud(data, data.width/2, data.height/2); // put a cloud in the middle
 
-  // paint the plasma+cloud on the canvas
-  context.putImageData(data, 0, 0);
+// paint the plasma+cloud on the canvas
+context.putImageData(data, 0, 0);
 
-  // support methods
-  function FillPlasma(data, color) { ... }
-  function AddCloud(data, x, y) { ... }
-</pre>
+// support methods
+function FillPlasma(data, color) { ... }
+function AddCloud(data, x, y) { ... }</pre>
 
   </div>
 

|