(rows: Set[int], GRID)
| 594 | |
| 595 | # -------------------------------------------------------------------- |
| 596 | def curate_rows(rows: Set[int], GRID) -> List: |
| 597 | rows = list(rows) |
| 598 | rows.sort() # sort ascending |
| 599 | nrows = [rows[0]] |
| 600 | for h in rows[1:]: |
| 601 | if h >= nrows[-1] + GRID: # only keep significant differences |
| 602 | nrows.append(h) |
| 603 | return nrows # curated list of line bottom coordinates |
| 604 | |
| 605 | def process_blocks(blocks: List[Dict], page: fitz.Page): |
| 606 | rows = set() |
no test coverage detected
searching dependent graphs…