Context
v1's geometry is ~220 LOC of pure, battle-tested functions. Port it, don't rewrite it.
Deliverables
- Hit-testing: point-in-bbox, point-in-polygon, handle/vertex/edge proximity with
zoom-aware tolerances.
- Bbox transforms: move, resize by 8 handles with min-size + bounds clamping; polygon:
vertex move, edge insert point, vertex delete.
- All coordinates in native asset pixels (screen↔image transforms live at the adapter
layer, not in core geometry).
Acceptance criteria
Context
v1's geometry is ~220 LOC of pure, battle-tested functions. Port it, don't rewrite it.
Deliverables
zoom-aware tolerances.
vertex move, edge insert point, vertex delete.
layer, not in core geometry).
Acceptance criteria