[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Should texImage2D and texSubImage2D accept more element types?





On Wed, May 30, 2012 at 9:26 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
On 5/30/12 5:43 PM, Gregg Tavares (社用) wrote:
   Something like this:

   <svg:image xlink:href="">
What is this?

A shorthand intended to communicate the idea without getting bogged down in long namespace URIs, because actually working with XML namespaces sucks, as you just discovered.

Did you mean this?

Pretty much, yes.


That's not part of the canvas spec AFAICT though
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html

Yes, that's a bug in the canvas spec as I said earlier in this thread.

I'm not sure I understand why it's important to support <svg:image> specifically. Why not support <svg:circle>, <svg:rect>, <svg:text>?  

Both FF and WebKit support drawing arbitrary SVG as an image to a canvas.

It seems pretty arbitrary that

<img src="" id="i">
ctx2d.drawImage(document.getElementById("i"), 0, 0);

works but

<svg id="i" ...> ... </svg>
ctx2d.drawImage(document.getElementById("i"), 0, 0);

does not even though they seem to achieve the same thing.


 


-Boris