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

Method Relate

path_intersection.go:227–229  ·  view source on GitHub ↗

Relate returns the spatial relation as defined by DE-9IM between the two paths as well as the intersections between both. It is faster if you need to check multiple spatial relations and/or retrieve the intersections.

(q *Path)

Source from the content-addressed store, hash-verified

225// Relate returns the spatial relation as defined by DE-9IM between the two paths as well as the intersections between both. It is
226// faster if you need to check multiple spatial relations and/or retrieve the intersections.
227func (p *Path) Relate(q *Path) (Relation, []Point) {
228 return relate(p.Split(), q.Split(), true)
229}
230
231// Intersections returns a list of points of all intersections of path p with q. The intersection can be tangent (touch) or secant
232// (cross). If the two paths are partially coincident it will return an intersection at the start and end. Equal paths have no

Callers 8

TestPathSettleFunction · 0.80
TestPathAndFunction · 0.80
TestPathOrFunction · 0.80
TestPathXorFunction · 0.80
TestPathNotFunction · 0.80
TestPathDivFunction · 0.80
TestPathRelateFunction · 0.80
drawFunction · 0.80

Calls 2

SplitMethod · 0.95
relateFunction · 0.85

Tested by 7

TestPathSettleFunction · 0.64
TestPathAndFunction · 0.64
TestPathOrFunction · 0.64
TestPathXorFunction · 0.64
TestPathNotFunction · 0.64
TestPathDivFunction · 0.64
TestPathRelateFunction · 0.64