Codier
Codier

Reputation: 2160

SVG VS Canvas in a note taking app

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

Answers (3)

Robert Longson
Robert Longson

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

CoR
CoR

Reputation: 3914

I do not know what really is "note taking app" but take a look at this svg edit

Upvotes: 0

Jani Hartikainen
Jani Hartikainen

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

Related Questions