Measure which mask layers a crop takes out of the frame

Mask geometry is stored in source coordinates, so re-cropping tighter
never destroys a layer. It makes it invisible: the layer stays in the
panel and the sidecar, its adjustment lands on pixels nobody will see,
and nothing says so. The spec had no clause for this; FR-DEV-17 now
states it, under the ID issue #10 reserved.

dr_pipeline::orphan samples each layer's mask on a 64x64 lattice over
the source, with the gradient, radial, brush and model-raster geometry
the mask shader uses, folds the parts by their joins and inversions, and
maps the samples through the framing to see how much of the coverage
the crop keeps. `hidden_by_crop` reports the layers whose share fell
below a tenth, and only those the change newly hid, so an already
stranded layer is not announced again on every later adjustment.

Ranges follow the picture and region selections need a label map this
crate does not hold, so a layer that adds either is never reported: a
false alarm on the common path would teach the notice to be dismissed
unread.
This commit is contained in:
2026-09-24 21:52:02 -04:00
parent 733a033274
commit 9772785f81
4 changed files with 701 additions and 51 deletions
+11
View File
@@ -583,6 +583,17 @@ which knows nothing of a layer's shaping and nothing at all about a gradient, a
so choosing a subject or a category produced a layer whose extent was invisible, and every control
in FR-DEV-19a and FR-DEV-19b acted on something the photographer could not see.
**FR-DEV-17 — A crop that orphans a mask says so.** When a crop is let go — the end of the drag,
not any frame of it — and it has left a mask layer's coverage entirely or mostly outside the frame,
the photographer is told how many layers, and which, and offered to keep the crop or take it back.
The crop is applied either way and is never refused; taking it back is the ordinary undo, so the
crop and its warning are one step in the history. A crop that strands nothing, and a layer already
outside the frame before the crop moved, produce no notice at all.
Mask geometry is stored in source coordinates, so a tighter crop does not destroy a layer: it makes
it invisible, and nothing announces it. That silent loss is the whole case for cropping last; a
notice at the moment it happens turns it into a decision, and lets the crop stay where the histogram
argues it belongs — early.
**FR-DEV-16 — A keyboard vocabulary for develop.** Every develop gesture that can be reached from
the keyboard is bound, tagged beside its implementation, and generated into the gesture book
(FR-UI-4): stepping through the folder, fit and 1:1, holding the original, undo and redo, copying
File diff suppressed because one or more lines are too long