Yes, that'd be very useful as a built-in. In the meantime, you could use a SVG-on-canvas renderer such as:
Re:SVG vs Canvas, what format to choose?
by justincormack on Monday May 23, 2011 @05:37AM
(#2575436)
Some browsers can render images in canvas that are actually SVG files, but support is a bit patchy outside Webkit, and there are some other issues, but may work for you. http://www.svgopen.org/2010/papers/62-From_SVG_to_Canvas_and...
http://jsbin.com/ibuqi5
Looks great in Chrome for me, aliased in Firefox.
for example
var circle = document.createElementNS("http://www.w3.org/2000/svg, "circle"); circle.setAttribute("style", "fill:green"); circle.setAttribute("cx", 50); circle.setAttribute("cy", 50); circle.setAttribute("r", 25);
ctx.drawSvg(circle,x,y,w,h);
I think then we could have the best of both worlds, define complex shapes in svg, but use canvas for rendering. The advantage over just using svg is that every shape is in the dom, so if you want to draw 1000 similar shapes the dom gets cluttered.