Skip to main content

Path.intersects()

The Path.intersects() method returns the Point object(s) where the path intersects with a path you pass it.

warning

This method can sometimes fail to find intersections in some curves due to a limitation in an underlying Bézier library. Please see Bug #3367 for more information.

Signature

array|false path.intersects(Path path)

Example of the Path.intersects() method

Notes

This is an expensive (read: slow) method that you should only use when you don't know in advance in what segment of your path the intersection will occur.

If you do know, use one of the intersection methods in Utils.