MCPcopy
hub / github.com/tdewolff/canvas / Intersections

Method Intersections

path_intersection.go:235–238  ·  view source on GitHub ↗

Intersections returns a list of points of all intersections of path p with q. The intersection can be tangent (touch) or secant (cross). If the two paths are partially coincident it will return an intersection at the start and end. Equal paths have no intersections. If q is nil it returns the inters

(q *Path)

Source from the content-addressed store, hash-verified

233// intersections. If q is nil it returns the intersections of p with itself. Intersections are sorted from left-to-right, and
234// otherwise from bottom-to-top.
235func (p *Path) Intersections(q *Path) []Point {
236 _, zs := relate(p.Split(), q.Split(), true)
237 return zs
238}
239
240// Touches returns true if path p and q are not disjoint, their boundaries/interiors intersect.
241// This is different from DE-9IM's definition of Touches.

Callers

nothing calls this directly

Calls 2

SplitMethod · 0.95
relateFunction · 0.85

Tested by

no test coverage detected