The utils.curveIntersectsY()
function finds the point(s) where a curve
intersects a given Y-value.
WARNING
This function 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
Javascript
array | Point | false utils.curveIntersectsY(
Point start,
Point cp1,
Point cp2,
Point end,
float y)
This returns false
if no intersections are found,
a Point object if
a single intersection is found, and an array
of Point objects if
multiple intersections are found.
Example
Notes
This is a low-level (and faster) variant
of Path.intersectsY()
.
Instead of a path, you describe a single curve by passing the four
points that describes it.