Detecting wether a point is inside or outside of a raphael.js shape

Posted by betamax on Stack Overflow See other posts from Stack Overflow or by betamax
Published on 2010-04-17T16:55:30Z Indexed on 2010/04/17 17:03 UTC
Read the original article Hit count: 631

I have a raphael.js shape which I am plotting circle's on top of. I only want a circle to appear if the circle does not go off the boundary of the shape it is being plotted on to.

To make this more clear, here is an example of what I do not want to happen:

Example

I want the circles outside of the grey area not to appear. How would I detect wether a circle is inside or outside of the grey shape?

© Stack Overflow or respective owner

Related posts about raphael

Related posts about raphael-js