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

后端 未结 3 624
一向
一向 2021-01-06 16:52

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

3条回答
  •  温柔的废话
    2021-01-06 17:31

    You could just apply a clip-path (that should be defined to be the grey shape you have in your example) on a group ( element) containing the circles.

    See this example from the w3c SVG testsuite for how to use clip-paths.

提交回复
热议问题