Point in Poly

Richmond richmondmathewson at gmail.com
Wed May 29 12:35:43 EDT 2013


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

83,195,64  i.e. the fetching green

and when inwith the bounding rect but outwith the polygon I got

237,237,237

so "there you go"; all done and dusted :)

Richmond.

P.S. Ooooh, and by the way Happy Campers if you don't feel in the mood 
for a fetching green
why not go for a more moody 'Rose' or even a 'Gay Grenache'; it will go 
well with your scarf!




More information about the use-livecode mailing list