[whatwg] proposed canvas 2d API additions

Vladimir Vukicevic vladimirv at gmail.com
Tue May 16 01:25:01 PDT 2006


On 4/26/06, Ian Hickson <ian at hixie.ch> wrote:
>    ImageData getImageData(in float x, in float y, in float w, in float h);
>    void drawImageData(in float x, in float y, in ImageData d);

I'm about to implement this as suggested; however, I'd call the second
function here "putImageData" instead of "drawImageData"; draw implies
an actual drawing operation, similar to drawImage, that would be
affected by (at least) the current compositing operator.  What's
actually happening is a direct replacement of the pixel data in the
given region, so that could be confusing.  (If someone does want the
operator to be involved they can use an offscreen canvas to call
putImageData on and drawImage that in.)

    - Vlad



More information about the whatwg mailing list