- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 13 Jun 2008 01:48:37 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv24803 Modified Files: Overview.html Log Message: remove some redundant ImageData stuff (whatwg r1758) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.947 retrieving revision 1.948 diff -u -d -r1.947 -r1.948 --- Overview.html 13 Jun 2008 01:40:20 -0000 1.947 +++ Overview.html 13 Jun 2008 01:48:34 -0000 1.948 @@ -20290,12 +20290,6 @@ <h6 id=pixel><span class=secno>3.11.11.1.11. </span><dfn id=pixel1>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 id=createimagedata title=dom-context-2d-createImageData><code>createImageData(<var @@ -20389,11 +20383,7 @@ structures back to the canvas. <p>If the first argument to the method is null or not an <code><a - href="#imagedata">ImageData</a></code> object that was returned by <code - title=dom-context-2d-createImageData><a - href="#createimagedata">createImageData()</a></code> or <code - title=dom-context-2d-getImageData><a - href="#getimagedata">getImageData()</a></code> then the <code + href="#imagedata">ImageData</a></code> object then the <code title=dom-context-2d-putImageData><a href="#putimagedata">putImageData()</a></code> method must raise a <code>TYPE_MISMATCH_ERR</code> exception. @@ -20527,36 +20517,30 @@ <p>The data returned by <code title=dom-context-2d-getImageData><a href="#getimagedata">getImageData()</a></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><a href="#imagedata">ImageData</a></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> + each CSS pixel if the display used is a high 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><a href="#imagedata">ImageData</a></code> objects which can be used.</p> - <pre> - // canvas is a reference to a <canvas> element - var context = canvas.getContext('2d'); + <pre>// canvas is a reference to a <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> <div class=example>
Received on Friday, 13 June 2008 01:49:13 UTC