[whatwg] A question about the drawimage() canvas function

Rik Cabanier cabanier at gmail.com
Fri Mar 1 20:35:17 PST 2013


On Fri, Mar 1, 2013 at 5:41 PM, Glenn Maynard <glenn at zewt.org> wrote:

> On Fri, Mar 1, 2013 at 4:45 PM, Rik Cabanier <cabanier at gmail.com> wrote:
>
>> Sorry about being unclear. Yes, I meant in addition of.
>> So:
>> - add your suggested step 1
>> - change HTMLImageElement from original step 2 to CanvasImageSource
>>
>
> "image" is always a CanvasImageSource, so if this is what was intended it
> would just omit the type check entirely.
>

Agreed


>
> But why does it throw this exception in the first place?  It's a weird
> special case.  Blitting a zero-size image should do nothing, just like
> drawImage(src, 0, 0, 0, 0).


I agree. It seems odd...
Maybe it's just because that was the way it was implemented in WK.



More information about the whatwg mailing list