- I suppose this doesn't work because canvas is drawing a bitmap of a vector (and a bitmap is not a path).
- Even if it did work, the bitmap is likely always has a rectangular permitter.
Is there any way to leverage something like isPointInPath
when using drawImage
?
example:
- The top canvas is drawn using
drawImage
andisPointInPath
does not work. - The bottom canvas is drawn using
arc
andisPointInPath
works.
** EDIT **
I draw a circle on one canvas, and use isPointInPath
to see if the mouse pointer is inside the circle (bottom canvas in my example).
I also "copy" the bottom canvas to the top canvas using drawImage
. Notice that isPointInPath
will not work on the top canvas (most likely due to reasons I mentioned above). Is there a work-around I can use for this that will work for ANY kind of path (or bitmap)?