[whatwg] canvas elements <rect> <polygon> etc

On Sun, 11 Mar 2007, carmen wrote:
> >
> > suppose one is building a GUI with solely <canvas> elements.
> 
> i suppose i should have researched <canvas> - it looks like it doesn't 
> have elemnts one might be faimilar with the Tk canvas - you can only 
> draw using javascript. are there plans to support html style creation of 
> elements within the <canvas> tag?

No immediate plans, no. There have been suggestions along these lines, but 
in general SVG would be the preferred solution right now.


On Sun, 11 Mar 2007, carmen wrote:
> 
> thats kind of what i'm asking, it looks like SVG has its own API 
> already, sort of similar to canvas. are there plans to merge? can you 
> use svg elements inwide a canvas element or will the browser not find 
> them? are there plans for that to change? etc.

They are independent features.


> i guess a roadmap explaining the relationship between <canvas> and 
> <svg>.. is this another xhtml2 vs html5, simultaneous development? what 
> was wrong with SVG that required a simpler replacement (but i guess not 
> element level interface)..

SVG and <canvas> have very different expected use cases. <canvas> is 
useful for lightweight dynamic bitmap presentation, e.g. bitmap games, 
fractal generation, or dynamically generated sparklines. SVG is more 
suited for static images, sprite-based animation (e.g. your typical "Flash 
cartoon"), and interactive graphics where components are long-lived but 
move around a lot.


On Sun, 11 Mar 2007, ddailey wrote:
>
> I have had no interest in learning (or teaching) about the Canvas tag 
> since, from what I can see, it is quite impoverished relative to SVG. 
> And, to boot, it is not universal across browsers. The browsers that 
> support Canvas, pretty much already do support, or seem to be close to 
> supporting SVG.

Hopefully the explanation above highlights the reasons for both to exist.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 11 May 2007 11:34:42 UTC