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

Function chars_in_rect

src/table.py:126–135  ·  view source on GitHub ↗

Check whether any of the chars in CHAR are inside rectangle 'rect'.

(CHARS, rect)

Source from the content-addressed store, hash-verified

124
125
126def chars_in_rect(CHARS, rect):
127 """Check whether any of the chars in CHAR are inside rectangle 'rect'."""
128 return any(
129 1
130 and rect[0] <= c["x0"]
131 and c["x1"] <= rect[2]
132 and rect[1] <= c["y0"]
133 and rect[3] >= c["y1"]
134 for c in CHARS
135 )
136
137
138def _iou(r1, r2):

Callers 1

clean_graphicsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…