Snap To

MisterX b.xavier at internet.lu
Fri Jul 15 16:31:23 EDT 2005


Thanks Jim

That i could do already. The problem is that finding approximated rects of
corners of other windows can be taxing if not confusing... 

I've tried to do a double filter on h and v vectors but the same it's
confusing... Though this gives me a new sub-filtering idea... 

cheers
Xavier 

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Jim Lyons
> Sent: Friday, July 15, 2005 21:01
> To: use-revolution at lists.runrev.com
> Subject: Re: Snap To
> 
> 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
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage 
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 




More information about the use-livecode mailing list