mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-26 02:59:17 -06:00
The dimming outside the crop box was four quads, each joining a side of the photo to the matching side of the box. Aligned, that is the photo minus the box; rotated, the quads cross themselves and each other, so wedges inside the box were dimmed and wedges outside doubly dark, growing with the angle (the reporter's -45° shows it best). The export was never affected: the overlay alone was wrong. The dimming is now `outside_crop_mesh`: the photo's rectangle minus the box, as one mesh of four disjoint half-strips (outside edge i, inside edge i+1, clipped to the photo). A flat or non-finite box dims nothing. Tests: a coverage test over several box sizes and angles (every photo point outside the box in exactly one triangle, none inside the box or outside the photo), a degenerate-box test, and a headless pixel test at -45° (inside the box the frame matches the 0° frame; the photo's corner is dimmed), which failed on the old mesh.