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

Method invert

src/__init__.py:8776–8787  ·  view source on GitHub ↗

Calculate the inverted matrix. Return 0 if successful and replace current one. Else return 1 and do nothing.

(self, src=None)

Source from the content-addressed store, hash-verified

8774 return self
8775
8776 def invert(self, src=None):
8777 """Calculate the inverted matrix. Return 0 if successful and replace
8778 current one. Else return 1 and do nothing.
8779 """
8780 if src is None:
8781 dst = util_invert_matrix(self)
8782 else:
8783 dst = util_invert_matrix(src)
8784 if dst[0] == 1:
8785 return 1
8786 self.a, self.b, self.c, self.d, self.e, self.f = dst[1]
8787 return 0
8788
8789 @property
8790 def is_rectilinear(self):

Callers 2

__invert__Method · 0.95
test_matrixFunction · 0.95

Calls 1

util_invert_matrixFunction · 0.85

Tested by 1

test_matrixFunction · 0.76