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

Method Overlaps

path_intersection.go:250–253  ·  view source on GitHub ↗

Overlaps returns true if the interiors of p and q have at least one point in common. Either they have a secant intersection, one path in contained in the other, or both paths are equal. This is different from DE-9IM's definition of Overlaps.

(q *Path)

Source from the content-addressed store, hash-verified

248// they have a secant intersection, one path in contained in the other, or both paths are equal.
249// This is different from DE-9IM's definition of Overlaps.
250func (p *Path) Overlaps(q *Path) bool {
251 rel, _ := relate(p.Split(), q.Split(), false)
252 return (rel & 0x01) != 0
253}
254
255// Contains returns true if the interior of p contains the interior of q. Equal shapes contain
256// each other. If p contains q, then q is within p. This tests DE-9IM's Covers relation.

Callers

nothing calls this directly

Calls 2

SplitMethod · 0.95
relateFunction · 0.85

Tested by

no test coverage detected