Javascript draw dynamic line
Posted
by Ranch
on Stack Overflow
See other posts from Stack Overflow
or by Ranch
Published on 2010-03-24T16:57:06Z
Indexed on
2010/03/24
17:03 UTC
Read the original article
Hit count: 460
Hello,
I'm looking for Javascript code for letting the user draw a line (on an image).
Just as the line tool in Photoshop (for example):
The user clicks on the image, drags the mouse (while the line between the start point and the mouse point is dynamically drawn on mouse drag).
I would also need a callable function to send the page the start and end coordinates.
I've found this very nice script for area selection: http://www.defusion.org.uk/code/javascript-image-cropper-ui-using-prototype-scriptaculous/
and I've found many script for drawing lines (and other shapes in JS), but could not find what I'm looking for.
Thanks
© Stack Overflow or respective owner