fletcher.paths.trim-to-intersection()
Shorten a path drawable so it starts or ends at an intersection point with another drawable.
If there are multiple intersection points, the path is terminated at the one given by index, where intersections are ordered along the path starting from the start or end depending on the trimming mode.
fletcher.paths.trim-to-intersection( path: drawable, targets: array of drawables, trim: "start" "end", index: int, )
path
drawable
Drawable to truncate, of the form (type: "path", segments: ..).
targets
array of drawables
Cutting drawables which may intersect the drawable to truncate.
trim
"start" or "end" default
"start"Whether to trim/shorten the start or end of the path.
index
int default
0Index of the intersection point to use to trim the path. If trimming from the start, indexing begins at the start of the path; if trimming from the end, indexing is reversed so it starts at the intersection closest to the end.