How can I get the intersection of three shapes colliding and delete the parts that are not colliding in KonvaJs?

雨燕双飞 提交于 2020-12-06 05:31:29

问题


If I am given 3 circles and they are positioned as the primary colors circles (3 circles intersecting each other), is there a function that might help me to delete the parts that are not colliding with anything and just keep the intersecting parts?

Another example could be drawing three lines in such a way that it forms a triangle. By deleting the parts that are not colliding, we would end up with 3 points (at least visually, not sure if I end up with 3 in total or 6 from stacking up), which are the edges of the previous triangle.

I have been checking the ClipFunc and the HitFunc, but I am not sure if I am going through the correct/best path to solving my problem.

来源:https://stackoverflow.com/questions/64603077/how-can-i-get-the-intersection-of-three-shapes-colliding-and-delete-the-parts-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!