I opened this on my iPad and it made my inner Alanis Morisette mutter the word "ironic", but then my inner Ed Byrne said there's no incongruity between expected and actual unless one expects the future to appear in the present. Then my outer wikipedia said "cosmic irony, perhaps: a disparity between human desires and the harsh realities of the outside world."
Canvas seems like a really cool way to interact with raster graphics. But more and more it is also being used for animating vector graphics, you know, collections of lines, curves and gradients. Isn't SVG better suited for this?
Slides 33-35 talk about animating things in the Canvas. Clearing the frame and imperatively re-adding each element at each step seems awfully inefficient. The underlying rendering engine could optimize things much better if it was given more abstract information about the shapes and transformations involved, a la SVG.
Is there something I'm missing? Why isn't more done with SVG?
It's the age-old battle between retained-mode and immediate-mode graphics APIs. Immediate-mode always wins in the end because every retained-mode system is hiding an immmediate-mode system underneath, and the extra layer between app code and the display ends up slowing things down.
There are already some (imperfect) tools for rendering svg with javascript/canvas. If SVG ever went away as a standalone things it would be at a time where usable fallbacks ara available.
That said, Canvas doesn't yet support all the same fill modes as svg. I got caught by the lack of even-odd once.
SVG isn't going away; in fact it is likely to enjoy a surge in interest and adoption next year when IE9 is released, because for the first time a majority of web browsers will have SVG support.
12 comments
[ 2.9 ms ] story [ 25.5 ms ] threadWorks pretty well.
http://dl.dropbox.com/u/360937/Mobile%20Photo%20Jun%207%2C%2...
Slides 33-35 talk about animating things in the Canvas. Clearing the frame and imperatively re-adding each element at each step seems awfully inefficient. The underlying rendering engine could optimize things much better if it was given more abstract information about the shapes and transformations involved, a la SVG.
Is there something I'm missing? Why isn't more done with SVG?
That said, Canvas doesn't yet support all the same fill modes as svg. I got caught by the lack of even-odd once.
Thanks. I'll keep it simple then.