
What is Hit Testing?Many graphics programs are interactive. You may wish to detect the position of the mouse and see if it coincides with a specific thing that you've drawn on screen. Most commonly this will be accomplished by using the Rectangle or RectangleF Contains method to see if an area contains a point. Less often, this will involve more complex methods like detecting if the mouse is in a shape that is non-rectangular. This can be accomplished by hit-testing in a Region object |