HTML5 Canvas vs SVG/VML? -


please tell me think html5 canvas vs svg/vml? give me pros , cons within comparison.

thank you!!!

html5 canvas drawing surface bit map. set draw (say color , line thickness) , draw thing, , canvas has no knowledge of thing: doesn't know or is, it's pixels. if want draw rectangles , have them move around or selectable have code of scratch, including code remember drew them.

on other hand, every svg/vml element create real element in dom. default allows keep better track of elements create , makes dealing things mouse events easier default.

canvas better faster things , heavy bitmap manipulation (like animation), take more code if want lots of interactivity.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -