Reputation: 2160
I have read through quite a few past answers to this comparison question. But did not find a satisfying answer to my particular situation.
I want to make a note taking application using either SVG or Canvas. But find it hard to decide between SVG or Canvas.
The note taking app should be simple (only drawing/writing + erasing) capability. I guess both SVG and canvas can work. But is it true that Canvas is going to be easier to program than SVG for this particular task?
THanks
Upvotes: 1
Views: 641
Reputation: 124014
This article has a good overview of the differences and why you might choose one over the other: http://blogs.msdn.com/b/ie/archive/2011/04/22/thoughts-on-when-to-use-canvas-and-svg.aspx
basically canvas is pixel based whereas SVG is object based.
If you need to know which shape you clicked on afterwards it's easier in SVG.
If you just want to draw stuff as fast as possible then canvas may be your best bet.
Upvotes: 1
Reputation: 3914
I do not know what really is "note taking app" but take a look at this svg edit
Upvotes: 0
Reputation: 43243
Canvas will be easier since you mention erasing. Because canvas is bitmap graphics, to erase something you simply clear the specific pixels you want to get rid of.
To do the same in SVG, you would need to either clear entire shapes or determine how to modify the shapes to erase only parts of them - or add new shapes on top using white or whatever is the background color.
Upvotes: 2