Click to See Complete Forum and Search --> : drawing rectangle on jpg


idh_31
11-03-2005, 06:04 AM
Hi all,

I am looking for a hint about the design of my app. I have a server PC and a client (a PDA), and the user should be able to draw a rectangle on a JPG to select something. My problem is how I can achieve this - I can't use Java.

I found that the mapped images might be helpful for me; I could create a dense grid and get a notice where the user clicked on the image. Like this, I could get the upper left corner and the lower right corner.
However, what I don't know is how I can draw this rectangle so that the user can see its selection. Are there any functions in Javascript? If not, do I have to send the coordinates back to the server, and get a new JPG? What is the best way to do it?

TheBearMay
11-03-2005, 07:17 AM
Might want to look at this and see if it's what you need:

http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm

idh_31
11-03-2005, 07:59 AM
Thanks, this looks very promising! I will give it a try.