Point in Poly

dunbarx at aol.com dunbarx at aol.com
Wed May 29 11:41:58 EDT 2013


What Geoff said.


Another way is:




on mouseMove
   if the mouseloc is within the rect of grc 1 then put the mouseColor
end mousemove


The "mouseColor" is a function that works only on the properties of the current mouseLoc. It has one advantage in that it can tell when the mouse is outside the rect, inside the rect, or inside an opaque graphic within that rect.


Craig Newman






-----Original Message-----
From: Geoff Canyon <gcanyon at gmail.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Wed, May 29, 2013 11:35 am
Subject: Re: Point in Poly


On Wed, May 29, 2013 at 9:44 AM, Devin Asay <devin_asay at byu.edu> wrote:

> Have you tried the within() function? It works the way you describe for
> images, but I'm not sure about graphics objects.



This works for graphics objects as well, as long as their opaque is true.

within(grc 1,the loc of btn 1) -- true if the point is within the actual
graphic, not just the rect.
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 



More information about the use-livecode mailing list