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

Method __truediv__

src/__init__.py:14662–14670  ·  view source on GitHub ↗
(self, m)

Source from the content-addressed store, hash-verified

14660 return Rect(self.x0 - p[0], self.y0 - p[1], self.x1 - p[2], self.y1 - p[3])
14661
14662 def __truediv__(self, m):
14663 if hasattr(m, "__float__"):
14664 return Rect(self.x0 * 1./m, self.y0 * 1./m, self.x1 * 1./m, self.y1 * 1./m)
14665 im = util_invert_matrix(m)[1]
14666 if not im:
14667 raise ZeroDivisionError(f"Matrix not invertible: {m}")
14668 r = Rect(self)
14669 r = r.transform(im)
14670 return r
14671
14672 @property
14673 def bottom_left(self):

Callers

nothing calls this directly

Calls 3

transformMethod · 0.95
RectClass · 0.85
util_invert_matrixFunction · 0.85

Tested by

no test coverage detected