Snap To
Jim Lyons
jimlyons at earthlink.net
Fri Jul 15 15:00:54 EDT 2005
Xav,
I didn't see a reply to this yet:
> Im wondering if anyone has a snap-to point script or algorithm they
> might
> want to share. Doesn't need to be a script but i would prefer a
> proven-working model or concept.
The idea is to round off the coordinates to the nearest multiple of
your grid points. If you put this in a button script, the button will
only move to points at coordinates that are multiples of 8.
on mouseDown
repeat while the mouse is down -- (this is just for testing
something!)
show me at 8*(mouseH() div 8 ), 8*(mouseV() div 8)
end repeat
end mouseDown
HTH, sorry if this isn't what you meant.
Jim Lyons
More information about the use-livecode
mailing list