- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 30 Apr 2009 23:01:13 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv30602 Modified Files: Overview.html Log Message: createImageData() now also takes a single ImageData argument, so that you can get new ImageData objects of the same dimensions, for filters that need that kind of thing. (whatwg r3046) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.2205 retrieving revision 1.2206 diff -u -d -r1.2205 -r1.2206 --- Overview.html 30 Apr 2009 22:53:56 -0000 1.2205 +++ Overview.html 30 Apr 2009 23:01:10 -0000 1.2206 @@ -19869,6 +19869,7 @@ // pixel manipulation <a href="#imagedata">ImageData</a> <a href="#dom-context-2d-createimagedata" title="dom-context-2d-createImageData">createImageData</a>(in float sw, in float sh); + <a href="#imagedata">ImageData</a> <a href="#dom-context-2d-createimagedata" title="dom-context-2d-createImageData">createImageData</a>(in <a href="#imagedata">ImageData</a> imagedata); <a href="#imagedata">ImageData</a> <a href="#dom-context-2d-getimagedata" title="dom-context-2d-getImageData">getImageData</a>(in float sx, in float sy, in float sw, in float sh); void <a href="#dom-context-2d-putimagedata" title="dom-context-2d-putImageData">putImageData</a>(in <a href="#imagedata">ImageData</a> imagedata, in float dx, in float dy, [Optional] in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight); }; @@ -21850,6 +21851,19 @@ </dd> + <dt><var title="">imagedata</var> = <var title="">context</var> . <code title="dom-context-2d-createImageData"><a href="#dom-context-2d-createimagedata">createImageData</a></code>(<var title="">imagedata</var>)</dt> + + <dd> + + <p>Returns an <code><a href="#imagedata">ImageData</a></code> object with the same + dimensions as the argument. All the pixels in the returned object + are transparent black.</p> + + <p>Throws a <code><a href="#not_supported_err">NOT_SUPPORTED_ERR</a></code> exception if the + argument is null.</p> + + </dd> + <dt><var title="">imagedata</var> = <var title="">context</var> . <code title="dom-context-2d-getImageData"><a href="#dom-context-2d-getimagedata">getImageData</a></code>(<var title="">sx</var>, <var title="">sy</var>, <var title="">sw</var>, <var title="">sh</var>)</dt> <dd> @@ -21898,11 +21912,16 @@ </dl><div class="impl"> - <p>The <dfn id="dom-context-2d-createimagedata" title="dom-context-2d-createImageData"><code>createImageData(<var title="">sw</var>, <var title="">sh</var>)</code></dfn> method must - return an <code><a href="#imagedata">ImageData</a></code> object representing a rectangle - with a width in CSS pixels equal to the absolute magnitude of <var title="">sw</var> and a height in CSS pixels equal to the absolute - magnitude of <var title="">sh</var>, filled with transparent - black.</p> + <p>The <dfn id="dom-context-2d-createimagedata" title="dom-context-2d-createImageData"><code>createImageData()</code></dfn> + method is used to instantiate new blank <code><a href="#imagedata">ImageData</a></code> + objects. When the method is invoked with two arguments <var title="">sw</var> and <var title="">sh</var>, it must return an + <code><a href="#imagedata">ImageData</a></code> object representing a rectangle with a width + in CSS pixels equal to the absolute magnitude of <var title="">sw</var> and a height in CSS pixels equal to the absolute + magnitude of <var title="">sh</var>. When invoked with a single <var title="">imagedata</var> argument, it must return an + <code><a href="#imagedata">ImageData</a></code> object representing a rectangle with the same + dimensions as the <code><a href="#imagedata">ImageData</a></code> object passed as the + argument. The <code><a href="#imagedata">ImageData</a></code> object return must be filled + with transparent black.</p> <p>The <dfn id="dom-context-2d-getimagedata" title="dom-context-2d-getImageData"><code>getImageData(<var title="">sx</var>, <var title="">sy</var>, <var title="">sw</var>, <var title="">sh</var>)</code></dfn> method must return an @@ -21916,10 +21935,11 @@ <p>If any of the arguments to <code title="dom-context-2d-createImageData"><a href="#dom-context-2d-createimagedata">createImageData()</a></code> or <code title="dom-context-2d-getImageData"><a href="#dom-context-2d-getimagedata">getImageData()</a></code> are - infinite or NaN, the method must instead raise a - <code><a href="#not_supported_err">NOT_SUPPORTED_ERR</a></code> exception. If either the <var title="">sw</var> or <var title="">sh</var> arguments are zero, the - method must instead raise an <code><a href="#index_size_err">INDEX_SIZE_ERR</a></code> - exception.</p> + infinite or NaN, or if the <code title="dom-context-2d-createImageData"><a href="#dom-context-2d-createimagedata">createImageData()</a></code> + method is invoked with only one argument but that argument is null, + the method must instead raise a <code><a href="#not_supported_err">NOT_SUPPORTED_ERR</a></code> + exception. If either the <var title="">sw</var> or <var title="">sh</var> arguments are zero, the method must instead raise + an <code><a href="#index_size_err">INDEX_SIZE_ERR</a></code> exception.</p> <p><code><a href="#imagedata">ImageData</a></code> objects must be initialized so that their <dfn id="dom-imagedata-width" title="dom-imagedata-width"><code>width</code></dfn> attribute
Received on Thursday, 30 April 2009 23:01:27 UTC