Skip to main content

Module geometry

Module geometry 

Source
Expand description

Geometry for OCR boxes: where the photo sits in the viewer, box hit-testing, and reading order.

Structsยง

ImageRect ๐Ÿ”’
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::Contain draws image into; None for empty sizes.
quad_contains ๐Ÿ”’
Whether p lies 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.