MCPcopy Create free account
hub / github.com/tdewolff/canvas / Contains

Method Contains

util.go:564–566  ·  view source on GitHub ↗

Contains returns true if r contains q.

(q Rect)

Source from the content-addressed store, hash-verified

562
563// Contains returns true if r contains q.
564func (r Rect) Contains(q Rect) bool {
565 return r.X0 <= q.X0 && q.X1 <= r.X1 && r.Y0 <= q.Y0 && q.Y1 <= r.Y1
566}
567
568// Overlaps returns true if both rectangles overlap.
569func (r Rect) Overlaps(q Rect) bool {

Callers 5

TestPathRelateFunction · 0.45
drawFunction · 0.45
TestPDFMultipageFunction · 0.45
TestPDFMetadataFunction · 0.45
TestStarTexFunction · 0.45

Calls

no outgoing calls

Tested by 4

TestPathRelateFunction · 0.36
TestPDFMultipageFunction · 0.36
TestPDFMetadataFunction · 0.36
TestStarTexFunction · 0.36