[whatwg] proposed canvas 2d API additions

Vladimir Vukicevic vladimirv at gmail.com
Tue May 16 02:09:37 PDT 2006


On 5/16/06, Vladimir Vukicevic <vladimirv at gmail.com> wrote:
> 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.)

Also: ImageData should come first, for consistency with the other
object-using methods (drawImage):

void putImageData(in ImageData d, in float x, in float y);

    - Vlad (who's writing this as he's implementing)



More information about the whatwg mailing list