mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-06 18:52:36 +00:00
A poster box fitted to the annotation rectangle in floating point can end a few ulps outside it (a 7x3 picture centred in 0 100 3.6 110.8 spans -2.2e-16 to 3.6000000000000005), and the exact containment check refused it. The check now allows a slack of 1e-9 of the rectangle's largest coordinate, clamps the box to the rectangle, and only then requires it to have width and height, so a box wholly within the slack outside the rectangle is still refused. Tests: a_3d_poster_fitted_to_its_rectangle_with_rounding_is_taken fails without the slack (Invalid); the new case in a_3d_poster_outside_its_rectangle_or_without_a_size_is_refused fails when the size check runs before the clamp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9