As part of a Funnel chart I'm drawing parallelograms on a canvas. To facilitate clicking on the parallelograms (ie the segments of the Funnel) I'm storing the coordinates and doing checks on the mouse coords to see if the mouse is in the correct area. This works just fine and dandy.
However now I've come across the .isPointInPath() method (its only taken four years). So I'm wondering if it would be faster (it would certainly be easier), to use those coords) to:
1) Replay the path without stroking or filling it so it's not visible 2) Check the mouse coords using this .isPointInPath() method
When a click occurs and the checks commence there could be multiple segments to check - eg 5.