Re: Point in Poly

2013-05-30 Thread Ray Horsley
Just a quick thanks to all those who took the time to contribute to this thread! Let of great ideas. On May 29, 2013, at 2:22 PM, J. Landman Gay wrote: On 5/29/13 11:33 AM, Roger Guay wrote: What a cool idea! I also wonder if blending will work? It does. In fact, when I need an opaque

Point in Poly

2013-05-29 Thread Ray Horsley
Is there a way to determine if a point is inside of a polygon graphic, and not necessarily inside the graphic's containing rectangle? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage

Re: Point in Poly

2013-05-29 Thread Devin Asay
On May 29, 2013, at 8:17 AM, Ray Horsley wrote: Is there a way to determine if a point is inside of a polygon graphic, and not necessarily inside the graphic's containing rectangle? Ray, Have you tried the within() function? It works the way you describe for images, but I'm not sure about

Re: Point in Poly

2013-05-29 Thread Mike Bonner
If it doesn't work the same with graphics you could cheat and snapshot, overlay, check, delete the snapshot. On Wed, May 29, 2013 at 8:44 AM, Devin Asay devin_a...@byu.edu wrote: On May 29, 2013, at 8:17 AM, Ray Horsley wrote: Is there a way to determine if a point is inside of a polygon

Re: Point in Poly

2013-05-29 Thread Richmond
On 05/29/2013 05:44 PM, Devin Asay wrote: On May 29, 2013, at 8:17 AM, Ray Horsley wrote: Is there a way to determine if a point is inside of a polygon graphic, and not necessarily inside the graphic's containing rectangle? Unfortunately my feeble attempt with: on mouseDown grab me end

Re: Point in Poly

2013-05-29 Thread Geoff Canyon
On Wed, May 29, 2013 at 9:44 AM, Devin Asay devin_a...@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

Re: Point in Poly

2013-05-29 Thread Mike Bonner
if the grc is set to opaque (or selected) it works fine, if within(grc mygrc, the loc of me) then On Wed, May 29, 2013 at 9:25 AM, Richmond richmondmathew...@gmail.comwrote: On 05/29/2013 05:44 PM, Devin Asay wrote: On May 29, 2013, at 8:17 AM, Ray Horsley wrote: Is there a way

Re: Point in Poly

2013-05-29 Thread dunbarx
the rect, inside the rect, or inside an opaque graphic within that rect. Craig Newman -Original Message- From: Geoff Canyon gcan...@gmail.com To: How to use LiveCode use-livecode@lists.runrev.com Sent: Wed, May 29, 2013 11:35 am Subject: Re: Point in Poly On Wed, May 29, 2013 at 9:44

Re: Point in Poly

2013-05-29 Thread Dar Scott
I like the idea of trying to get within() to work. But if that does not work, try computing. Consider a horizontal line through the point. Find the points where it crosses the line segments of the sides. (Take care of the special case of a line segment being on your horizontal line.) Count

Re: Point in Poly

2013-05-29 Thread Geoff Canyon
On Wed, May 29, 2013 at 10:44 AM, Dar Scott d...@swcp.com wrote: Consider a horizontal line through the point. Find the points where it crosses the line segments of the sides. (Take care of the special case of a line segment being on your horizontal line.) Count the points to the left of

Re: Point in Poly

2013-05-29 Thread Malte Brill
Of course you might also want to take a look at the animationEngine sourcecode, which has a function for that. ;-) Cheers, Malte -- derbrill IT-service Malte Pfaff-Brill Tanneneck 2, d-24790 Ostenfeld Tel: +49 4331-337 640 0 eMail: i...@derbrill.de web: http://www.derbrill.de Steuernummer: 28

Re: Point in Poly

2013-05-29 Thread Roger Guay
What's wrong with intersect(grc pointThing, grc polyThing, pixels)? Assuming opaque polygon, of course. Roger On May 29, 2013, at 7:17 AM, Ray Horsley r...@linkit.com wrote: Is there a way to determine if a point is inside of a polygon graphic, and not necessarily inside the graphic's

Re: Point in Poly

2013-05-29 Thread Dar Scott
It seems opaque has come up several times. I wonder if that can be set temporarily inside lock screen and get the right results for polygons that are not opaque. Dar On May 29, 2013, at 10:07 AM, Roger Guay wrote: What's wrong with intersect(grc pointThing, grc polyThing, pixels)?

Re: Point in Poly

2013-05-29 Thread Roger Guay
What a cool idea! I also wonder if blending will work? I'm going to go play. Thanks! On May 29, 2013, at 9:27 AM, Dar Scott d...@swcp.com wrote: I wonder if that can be set temporarily inside lock screen and get the right results for polygons that are not opaque.

Re: Point in Poly

2013-05-29 Thread Richmond
Well: I made a stack with a regular polygon shape (7 sides) filled with a very 'fetching' green, and a field called INN, and put this script into the graphic: on mouseWithin put the mouseColor into fld INN end mouseWithin and . . . when the mouse was WITHIN the coloured polygon I got

Re: Point in Poly

2013-05-29 Thread Mike Bonner
Is the opaque pixelx functionality fixed for the current version (with intersect)? It was broken in 6.0 community. On Wed, May 29, 2013 at 10:35 AM, Richmond richmondmathew...@gmail.comwrote: Well: I made a stack with a regular polygon shape (7 sides) filled with a very 'fetching' green,