I know that the rectangle object has a "contains" method, but what would be the best way to find if a given point is inside the boundaries of a series of points fed into the GraphicsPath.AddLines() method.
One method I had suggested to me was to take that point and draw a line starting there and going along the x-axis to an arbitrary value that is definetely father than any point in the shape. If that line intersects any other line 0 or 2 times then it is outside the shape. If it intersects 1 time then it is inside the shape. Follow? My dilemma, if this is the best way to do what I want to do, is to figure out how to determine if a line intersects any other lines.
Let me know if any of this needs clarifying.
Thanks in advance!
One method I had suggested to me was to take that point and draw a line starting there and going along the x-axis to an arbitrary value that is definetely father than any point in the shape. If that line intersects any other line 0 or 2 times then it is outside the shape. If it intersects 1 time then it is inside the shape. Follow? My dilemma, if this is the best way to do what I want to do, is to figure out how to determine if a line intersects any other lines.
Let me know if any of this needs clarifying.
Thanks in advance!