View Single Post
Old 02-13-2013, 10:41 PM   PM User | #3
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,217
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Look into the canvas object.

But be forewarned that it's an HTML5 object, so even it is not universal. But it may be as close as you come.

If you don't need the drawing to be "real time" (that is, if you simply want to offer up an image that is already drawn), then you could use server-side code to produce an image (e.g., a JPG or PNG file) that you then simply display on the page. That will work with any browser, since it has nothing to do with the browser, per se.

How you will produce such an image will depend on what server technology you are using. I know how to do it with ASP and ASP.NET code, for example. There are PHP gurus here who could tell you how to do it with PHP code.

But if you are willing to live with the limitation that only HTML5-enabled browsers will work, then canvas should do what you want, all in JavaScript.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is online now   Reply With Quote
Users who have thanked Old Pedant for this post:
Kathya (02-13-2013)