Finding a point inside or outside the raphael.js form

I have a raphael.js form that I draw a circle on top of. I need only a circle if the circle does not go beyond the border of the form on which it is applied.

To make this clearer, here is an example of what I don't want:

Example http://img682.imageshack.us/img682/4168/shapeh.png

I want circles outside the gray area not to appear. How would I find that the circle inside or outside is gray?

+3
source share
3 answers

You can simply apply a clip path (which should be defined as a gray figure in your example) in a group (element <g>) containing circles.

w3c SVG testsuite .

+3

, , :

  • , .
  • .
  • , .
  • , . , .

, , raphael.js. .

+4

"- SVG-?".

You just need to call getIntersectionList () at the position of the circle and see if it will return a large gray shape.

+1
source

Source: https://habr.com/ru/post/1741592/


All Articles