Inaccuracies using the Within keyword

dunbarx at aol.com dunbarx at aol.com
Mon Jan 27 12:45:01 EST 2014


Here as well.  Similar problem with a regular polygon.


With a rectangle or oval grc however, the cursor has to be right where one would think it should be in order to distinguish "in" from "out". 



-----Original Message-----
From: Ray <ray at linkit.com>
To: use-livecode <use-livecode at lists.runrev.com>
Sent: Mon, Jan 27, 2014 11:27 am
Subject: Inaccuracies using the Within keyword


I've created a triangle (shape of an Egyptian pyramid) with the Freehand 
Polygon tool, made it opaque, filled it black and put the following 
script in the stack:

on mouseMove
    if within(grc "Polygon",the mouseLoc ) then
       put ""&the mouseLoc&" - IN"
    else put ""&the mouseLoc&" - OUT"
end mouseMove

As I move the mouse in and out of the black area of the polygon Livecode 
senses that it is IN the polygon about 5 pixels before it is; that is if 
I'm hovering the tip of the arrow cursor around either the left or right 
side of my pyramid.  Hover around the base and it's dead on.  I wonder why?

Does anybody have a minute to confirm this?

Thanks!

Ray Horsley
LinkIt!

_______________________________________________
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