Hay, I’m writing a simple web based image maker, and would like to know if anyone has any idea’s how to implement a lasso tool. I’d like to be able to save all the points so that I can easily send them to a database and retrieve them at a later date.
Share
As a basic plug-in, this would probably look something like this:
later, apply
lasso()to any element and handle the events accordingly:lassoPointwill be an array of X,Y co-ordinates.lassoPointswill be an array oflassoPoint.You should probably include an extra check for a “lasso enabled” flag of some sort into the
mousedownhandler, so that you can switch it on or off independently.