Files
photocraft/crates/engine
yangandClaude Opus 5.5 ba4dc112bb Artboard placement, edits and export reject coordinates past the 32-bit range instead of overflowing (#931) (#1032)
Default placement added the 100 px gap to the rightmost board's right edge in i32,
editing a board subtracted its old position from the new one in i32, and exporting
negated the board's origin, so a board at an i32 extreme overflowed (a panic in checked
builds, a wrapped position or content offset in release). Rects were also built with
Rect::from_xywh, which clamps the far edge and silently shrank boards past i32::MAX.

Board rects are now built in i64 and checked, so a rect with any edge outside i32 is a
bad-params error naming it; default placement with no room on the right asks for an
explicit x; a move whose offset needs more than 32 bits is rejected unless
moveContents is false; and export reports a board at i32::MIN instead of negating it.
All checks run before the document changes.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:09:21 -04:00
..