Reputation: 1748
I am building a web application in which the user would be able to draw zones (polygons) onto a video. A solution I already implemented was to put a <div>
on top of the video player, catching the mouse clicks.
What I'm willing to do right now, is being able to draw on that <div>
with the mouse:
I am looking for directions about which library to use. Already heard about:
Raphael looks monstruous but kinda overkill for what I want to do. And on the contrary, jsDraw2D seems to work just fine from what I tested (only drawed manually though).
I have several constraints such as:
<div>
with opacity on (the filled polygon should be transparent too)What should I use ? Should I stick to Raphael even though it's a bit difficult to implement (I've basically no background in JavaScript) ? Or do you know of a JavaScript library which could do what jsDraw2D does but in better ?
Thanks,
Upvotes: 0
Views: 351
Reputation: 861
You should use SVG because they are obviously more interactive and easy to implement. If you've ever used Khanacademy then probably you'll come to know that they use SVG in their scratchpad.
Moreover, SVGs are also w3c recommended like canvas
.
Upvotes: 1
Reputation: 18549
If you are able to go for HTML5 Canvas could be a good choice.
Upvotes: 0