Check whether any of the chars in CHAR are inside rectangle 'rect'.
(CHARS, rect)
| 124 | |
| 125 | |
| 126 | def 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 | |
| 138 | def _iou(r1, r2): |
no outgoing calls
no test coverage detected
searching dependent graphs…