I need the ability to determine which Shape a given point falls within. There will be overlapped shapes and I need to find the Shape with the smallest area. For example, given the Shapes and points illustrated in the image below the following would be true:
- Point 3 – collides with star
- Point 2 – collides with diamond
- Point 1 – collides with circle

Given this, I would like to know if there is a built in way to do what is needed.
I’ve arrived at a solution that meets the requirements, still interested in hearing if there is a better way of doing this. My approach is as follows: do a hit-test by bounding box, then a geometric hit test based on the type of geometry.
For Polygons, I’ve adapted the C code mentioned http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes /pnpoly.html to work in C#.
For Ellipses, I’ve adaptated this code: http://msdn.microsoft.com/en-us/library/aa231172%28v=vs.60%29.aspx