HTML5 Canvas element.

sunilmkt

Member
Nov 21, 2012
38
0
61
HTML5 Canvas became pretty intense when it became obvious that Apple would not support Flash on its mobile devices. What element I should use for making effective HTML5 canvas.
 

Red Squirrel

No Lifer
May 24, 2003
71,306
14,082
126
www.anyf.ca
Keep in mind with canvas you cannot really modify something once you've added it. So each frame of a video would be redrawing the whole thing. Not sure if it's meant for that.

I've been thinking of using it for one of my websites that has graphs though. Rather than try to use a 3rd party graph library to produce png images I could just use a canvas.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Keep in mind with canvas you cannot really modify something once you've added it. So each frame of a video would be redrawing the whole thing. Not sure if it's meant for that.

I've been thinking of using it for one of my websites that has graphs though. Rather than try to use a 3rd party graph library to produce png images I could just use a canvas.

My response was tongue-in-cheek because I don't really think this OP is legit, although there weren't obvious reasons to remove the post. We'll see.

But now that you've mentioned it... I looked into using canvas for a drawing project, but ran into the limitation you described. Once stuff is added you can't get any information about it. You can't extract markup that describes how the canvas is populated. It's basically a fire-n-forget drawing surface like a display buffer.

Instead I started looking at scalable vector graphics. SVG solves exactly these limitations, and has good browser support and a jquery wrapper.
 

GregGreen

Golden Member
Dec 5, 2000
1,688
5
81
Instead I started looking at scalable vector graphics. SVG solves exactly these limitations, and has good browser support and a jquery wrapper.

There are some nice libraries out there for helping with SVG charts/graphs/visualizations too! D3.js is really nice and dojo has a nice module for it as well
 

Leros

Lifer
Jul 11, 2004
21,867
7
81
There are also some libraries that are built on top of the canvas elements, abstracting some of its nuances away. I only spent a few minutes Googling so I don't really know too much about it.