Re: Canvas drawImage question

On Jun 11, 2010, at 7:41 AM, Boris Zbarsky wrote:

> I was just reading the drawImage section, and it seems that the arguments are restricted to HTMLImageElement, HTMLCanvasElement, and HTMLVideoElement for some reason.  Gecko also supports HTMLInputElement (if of type="image"), HTMLObjectElement (if rendering an image), as well as <svg:image> and <svg:feImage>.
> 
> Is there a good reason for the spec's restriction here?  In particular, why is <svg:image> not allowed?  But ideally any of the image elements above would be usable here.

I'm not sure it would be good to make the API conditionally support particular elements, depending on their state. That would apply to your HTMLInputElement and HTMLObjectElement proposals. svg:feImage also only conditionally refers to an image and in other cases is supposed to behave like the 'use' element.

I think adding svg:img would make sense.

Regards,
Maciej

Received on Friday, 11 June 2010 14:49:44 UTC