Expand description
Geometry for OCR boxes: where the photo sits in the viewer, box hit-testing, and reading order.
Structsยง
- Image
Rect ๐ - Where the photo is drawn inside its widget.
Constantsยง
- ROW_
THRESHOLD ๐ - Boxes whose tops are within 2% of the image height share a row, as in Immich web.
Functionsยง
- contain_
rect ๐ - The rect
gtk::ContentFit::Containdrawsimageinto;Nonefor empty sizes. - quad_
contains ๐ - Whether
plies inside a convex quad; points on an edge count as inside. - quad_
in_ ๐area - Maps normalized box corners into widget coordinates.
- reading_
order ๐ - Rows top to bottom, then left to right; rows are grouped first so the sort stays a total order.