D
Dave Veeneman
What is the simplest way to perform hit-testing on a polygon? A user control
I'm writing draws a document with a 'dog-ear' in the upper right corner. I
want the user to be able to click on the dogiear to perform an action. The
cursor should change when the mouse enters the dog-ear (to indicate that it
is 'live'), change back when the user leaves the dog-ear, and the program
should know when the user clicks inside the dog-ear.
I'm familair with mouse events, but I'm not sure how to hit-test a polygon.
I have the coordinates of the polygon, and it looks like I create a region
from the polygon, then use the Region.IsVisible() method to determine
whether the mouse coordinates are inside the region. Is that the way to do
it? Is there a simpler way? Thanks
I'm writing draws a document with a 'dog-ear' in the upper right corner. I
want the user to be able to click on the dogiear to perform an action. The
cursor should change when the mouse enters the dog-ear (to indicate that it
is 'live'), change back when the user leaves the dog-ear, and the program
should know when the user clicks inside the dog-ear.
I'm familair with mouse events, but I'm not sure how to hit-test a polygon.
I have the coordinates of the polygon, and it looks like I create a region
from the polygon, then use the Region.IsVisible() method to determine
whether the mouse coordinates are inside the region. Is that the way to do
it? Is there a simpler way? Thanks