Javascript and graphics


#1

Hey guys. Is it possible to use javascript to enable a user to do simple drawing of just lines and a particular image on the client side? Can Javascript then be used to create an xml string or file that represents the drawing? This xml file can then be stored on a server, so that the drawing can be retrieved at a later date for display.
If all this possible, how do I do it, and where do I start?


#2

Yes,by using the Canvas API,apparently it doesn’t support serializing,the canvas manipulates vectors and images,videos directly so I guess,u could just save the current image,but if its line,u could push arrays of lines as an xml, and re-read them when parsing the xml.


#3

thanks. I’ll see what I can do.