Commit graph

1 commit

Author SHA1 Message Date
jedarden
2cf02c6b2b feat(pdftract-sdx9z): implement Line struct and baseline computation
- Add layout::line module with Line<S> struct for Phase 4.2 line formation
- Implement compute_baseline() using plan formula: y0 + height * 0.2
- Add LineDirection enum with serde support (Ltr, Rtl, Mixed)
- Add union_bboxes() helper for computing span bbox unions
- Add HasBBox trait for generic span type support

Acceptance criteria:
- compute_baseline([0,100,50,110]) returns 102.0 (height 10)
- compute_baseline([0,100,50,100]) returns 100.0 (zero height)
- LineDirection serde roundtrips to "ltr"/"rtl"/"mixed"
- All 11 unit tests pass

Closes: pdftract-sdx9z
2026-05-24 02:54:00 -04:00