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

Function CheckQuad

src/__init__.py:22081–22091  ·  view source on GitHub ↗

Check whether an object is convex, not empty quad-like. It must be a sequence of 4 number pairs.

(q: typing.Any)

Source from the content-addressed store, hash-verified

22079
22080
22081def CheckQuad(q: typing.Any) -> bool:
22082 """Check whether an object is convex, not empty quad-like.
22083
22084 It must be a sequence of 4 number pairs.
22085 """
22086 try:
22087 q0 = Quad(q)
22088 except Exception:
22089 if g_exceptions_verbose > 1: exception_info()
22090 return False
22091 return q0.is_convex
22092
22093
22094def CheckRect(r: typing.Any) -> bool:

Callers 2

__contains__Method · 0.85
CheckMarkerArgFunction · 0.85

Calls 2

QuadClass · 0.85
exception_infoFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…