Whats the best way to check to see if a point exists in a polygon.
my shape is looks like the following
i need to determine if i have clicked within this shapeCode:
_____
/ |
| |
| |
| |
| |
\_____|
Printable View
Whats the best way to check to see if a point exists in a polygon.
my shape is looks like the following
i need to determine if i have clicked within this shapeCode:
_____
/ |
| |
| |
| |
| |
\_____|
There are a few threads around that have working solutions, there's a good discussion of a few methods here (including one of mine):
http://www.vbforums.com/showthread.php?t=244049
Depending on how you have your program working so far, there is also the API PtInRegion. There are a few threads about it on this site, a search should give you several examples :)
Here is all the code you need. It's much faster than PtInRegion and it doesn't require the API....Quote:
Originally Posted by Strider
http://support.microsoft.com/kb/q121960/