MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / __and__

Method __and__

src/__init__.py:14555–14561  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

14553 return Rect(self.x0 + p[0], self.y0 + p[1], self.x1 + p[2], self.y1 + p[3])
14554
14555 def __and__(self, x):
14556 if not hasattr(x, "__len__"):
14557 raise ValueError("bad operand 2")
14558
14559 r1 = Rect(x)
14560 r = Rect(self)
14561 return r.intersect(r1)
14562
14563 def __bool__(self):
14564 return not (max(self) == min(self) == 0)

Callers 1

__and__Method · 0.45

Calls 2

intersectMethod · 0.95
RectClass · 0.85

Tested by

no test coverage detected