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

Method Contains

path_intersection.go:257–260  ·  view source on GitHub ↗

Contains returns true if the interior of p contains the interior of q. Equal shapes contain each other. If p contains q, then q is within p. This tests DE-9IM's Covers relation.

(q *Path)

Source from the content-addressed store, hash-verified

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.
257func (p *Path) Contains(q *Path) bool {
258 rel, _ := relate(p.Split(), q.Split(), false)
259 return rel.Covers()
260}
261
262// SweepPoint is of size 88 bytes on 64-bit architectures
263type SweepPoint struct {

Callers

nothing calls this directly

Calls 3

SplitMethod · 0.95
relateFunction · 0.85
CoversMethod · 0.80

Tested by

no test coverage detected