Fade the draft into the sharp frame when a drag settles
When a gesture stopped, the half-resolution draft was replaced by the full-resolution frame in one step, a visible jump from soft to sharp. FR-DSP-4 asks for a refinement that is smooth, not a jarring swap. The canvas now keeps the last draft frame (`canvas-previous`) and draws it over the sharp one, fading it out over 150 ms when the draft flag clears. The fade costs no render: the draft is a refcount on the texture it was drawn into, and the adjust pass ping-pongs between two output targets, so the sharp frame is written into the other one. While a gesture is drafting the layer is hidden and snapped opaque, so a new drag shows its draft at once; past the fade it is hidden again, and a settled canvas composites one image as before.
This commit is contained in:
+35
-35
File diff suppressed because one or more lines are too long
@@ -25,11 +25,15 @@ Sampling a neutral is the first move of the tonal pass — every colour judgemen
|
||||
|
||||
Anchored on the fingers' midpoint, and on the pointer, so the gesture reads as magnifying the picture rather than sliding it about. Double-tap is the way to an exact 1:1; this is the way to everything in between. Past 1:1 the pixels are shown as they are, square and unsmoothed; below it, filtered.
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:1715`</sub>
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:1710`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:1755`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### Move a magnified photograph about
|
||||
|
||||
@@ -38,11 +42,15 @@ Anchored on the fingers' midpoint, and on the pointer, so the gesture reads as m
|
||||
|
||||
Only once there is something outside the viewport to reach, which is why the cursor becomes a hand exactly then. The view is clamped to the frame: panning past the edge would show undefined area beside the photograph, and that reads as a rendering fault rather than as the end of the picture.
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:1808`</sub>
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:1801`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:1846`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### Paint a mask by hand
|
||||
|
||||
@@ -51,11 +59,15 @@ Only once there is something outside the viewport to reach, which is why the cur
|
||||
|
||||
A model's mask stops inside a shoulder and leaks into the hair, and no single edge control fixes two errors that go opposite ways. The whole stroke is one step in the history, so taking a mark back costs one press however long it took to make.
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:1895`</sub>
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:1888`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:1933`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### Take back the last change
|
||||
|
||||
@@ -65,6 +77,7 @@ A model's mask stops inside a shoulder and leaks into the hair, and no single ed
|
||||
|
||||
A whole drag is one step, so undo takes back a decision rather than a frame of a gesture. The list is there because arriving six steps back costs what arriving from one does.
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:2123`</sub>
|
||||
@@ -74,6 +87,9 @@ A whole drag is one step, so undo takes back a decision rather than a frame of a
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2116`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2161`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### Do it again after taking it back
|
||||
|
||||
@@ -81,6 +97,7 @@ A whole drag is one step, so undo takes back a decision rather than a frame of a
|
||||
- **Pointer** — Click it, or press Redo in the History header
|
||||
- **Keyboard** — Ctrl+Shift+Z
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:2136`</sub>
|
||||
@@ -90,6 +107,9 @@ A whole drag is one step, so undo takes back a decision rather than a frame of a
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2129`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2174`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### Copy the settings from this photograph
|
||||
|
||||
@@ -99,6 +119,7 @@ A whole drag is one step, so undo takes back a decision rather than a frame of a
|
||||
|
||||
The button is the copy that has to work: a tablet has no modifier key to hold and no menu bar to hang the action from. The shortcut is an accelerator for a control that is on screen either way.
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:2169`</sub>
|
||||
@@ -108,6 +129,9 @@ The button is the copy that has to work: a tablet has no modifier key to hold an
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2162`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2207`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### Paste the settings onto this photograph
|
||||
|
||||
@@ -117,6 +141,7 @@ The button is the copy that has to work: a tablet has no modifier key to hold an
|
||||
|
||||
The button names what would be pasted — "3 adjustments", and whether the crop is coming with it — which the shortcut cannot say. Both paste the same scope.
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:2181`</sub>
|
||||
@@ -126,6 +151,9 @@ The button names what would be pasted — "3 adjustments", and whether the crop
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2174`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2219`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### Choose which kinds of edit a copy carries
|
||||
|
||||
@@ -135,6 +163,7 @@ The button names what would be pasted — "3 adjustments", and whether the crop
|
||||
|
||||
Lightroom's Copy Settings. Pasting a look across a shoot usually means leaving each frame's crop and rotation alone, and that is a choice to make at the moment of copying.
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:2198`</sub>
|
||||
@@ -144,6 +173,9 @@ Lightroom's Copy Settings. Pasting a look across a shoot usually means leaving e
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2191`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2236`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### Export this photograph as the last one was
|
||||
|
||||
@@ -153,6 +185,7 @@ Lightroom's Copy Settings. Pasting a look across a shoot usually means leaving e
|
||||
|
||||
Every export runs on the defaults in Settings, so "as the last one was" is what the button already does. The chord is Lightroom's and darktable's, kept so hands that learned it there need not learn it again.
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:2227`</sub>
|
||||
@@ -162,6 +195,9 @@ Every export runs on the defaults in Settings, so "as the last one was" is what
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2220`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2265`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### Choose how to export, then export
|
||||
|
||||
@@ -171,6 +207,7 @@ Every export runs on the defaults in Settings, so "as the last one was" is what
|
||||
|
||||
The export sheet is the export defaults alone with an Export button. What is chosen there is kept, so it is also what the next Ctrl+Shift+E uses.
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:2239`</sub>
|
||||
@@ -180,6 +217,9 @@ The export sheet is the export defaults alone with an Export button. What is cho
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2232`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2277`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### Change which group of adjustments is on screen
|
||||
|
||||
@@ -189,6 +229,7 @@ The export sheet is the export defaults alone with an Export button. What is cho
|
||||
|
||||
The groups are whatever the operation set declares itself to be about, so there are as many as the pipeline has and no key can be assigned to one of them by name. Stepping is the binding that survives a node being added.
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:2264`</sub>
|
||||
@@ -198,6 +239,9 @@ The groups are whatever the operation set declares itself to be about, so there
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2257`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2302`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### Look at the photograph at 1:1
|
||||
|
||||
@@ -207,6 +251,7 @@ The groups are whatever the operation set declares itself to be about, so there
|
||||
|
||||
Noise reduction and capture sharpening are judgements about single pixels, and a fitted view averages several of the file's into each one on screen — so the frame looks softer than it is and the correction goes too far. The point and the magnification survive opening the next photograph, which is what makes checking the same eye across forty portraits forty keystrokes rather than forty pans. From 1:1 on the photograph is drawn as its own pixels, each a hard-edged square, rather than smoothed into a blur.
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:2299`</sub>
|
||||
@@ -216,6 +261,9 @@ Noise reduction and capture sharpening are judgements about single pixels, and a
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2292`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2337`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### Move to the next or previous photograph
|
||||
|
||||
@@ -225,6 +273,7 @@ Noise reduction and capture sharpening are judgements about single pixels, and a
|
||||
|
||||
The edit on screen is saved on the way out, so stepping through a folder is as much a departure as going back to the grid and loses nothing. A and D as well as the arrows, so the left hand steps along the roll while the right stays on the mouse. Unmodified only: Ctrl+D and Ctrl+A are not this.
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:2354`</sub>
|
||||
@@ -234,6 +283,9 @@ The edit on screen is saved on the way out, so stepping through a folder is as m
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2344`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2389`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### See the photograph before you edited it
|
||||
|
||||
@@ -243,6 +295,7 @@ The edit on screen is saved on the way out, so stepping through a folder is as m
|
||||
|
||||
Held rather than toggled, and no split screen: a split halves the working image on the tablet the column was sized for, and the comparison photographers describe making is a flick back and forth. It takes no history step, so checking whether a frame is overcooked costs nothing to undo afterwards.
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<sub>`ui/dr-ui/ui/app.slint:2487`</sub>
|
||||
@@ -252,6 +305,9 @@ Held rather than toggled, and no split screen: a split halves the working image
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2477`</sub>
|
||||
>>>>>>> d11c8aa (Dim the histogram while the canvas shows a draft)
|
||||
=======
|
||||
<sub>`ui/dr-ui/ui/app.slint:2522`</sub>
|
||||
>>>>>>> 3f5f735 (Fade the draft into the sharp frame when a drag settles)
|
||||
|
||||
### Put one control back to its default
|
||||
|
||||
|
||||
+14
-5
@@ -2293,11 +2293,20 @@ fn build_render_now(
|
||||
match rendered {
|
||||
Ok(image) => {
|
||||
// TRACES: FR-DSP-4
|
||||
// **The draft flag goes past the render**, to the places
|
||||
// that have to know which kind of frame is up: the canvas,
|
||||
// and the histogram, which is measured on settled frames
|
||||
// only and so describes an older frame while a draft is
|
||||
// showing.
|
||||
// **The draft flag goes past the render**, to the two
|
||||
// places that have to know which kind of frame is up: the
|
||||
// canvas, which crossfades a draft into the sharp frame
|
||||
// that settles it, and the histogram, which is measured
|
||||
// on settled frames only and so describes an older frame
|
||||
// while a draft is showing.
|
||||
//
|
||||
// The draft is kept as the fade's starting picture. That
|
||||
// is a refcount on the texture it was drawn into, not a
|
||||
// copy or a render — see `canvas-previous` for why the
|
||||
// sharp frame cannot overwrite it.
|
||||
if draft {
|
||||
window.set_canvas_previous(image.clone());
|
||||
}
|
||||
window.set_canvas(image);
|
||||
window.set_canvas_draft(draft);
|
||||
window.global::<Levels>().set_provisional(draft);
|
||||
|
||||
@@ -102,6 +102,16 @@ export component AppWindow inherits Window {
|
||||
/// TRACES: FR-DSP-4
|
||||
/// Whether `canvas` is a draft: half resolution, rendered mid-gesture.
|
||||
in property <bool> canvas-draft;
|
||||
/// The last draft frame, kept for the crossfade into the sharp one.
|
||||
///
|
||||
/// Set only on draft frames, so on the frame that settles it still holds
|
||||
/// the draft that frame replaces. No render is spent on it: it is the
|
||||
/// texture the draft was already drawn into, and `AdjustPass` ping-pongs
|
||||
/// between two targets, so the sharp frame is written into the *other*
|
||||
/// one (and at a different size, which reallocates rather than
|
||||
/// overwrites). The fade is the compositor blending two textures it
|
||||
/// already holds.
|
||||
in property <image> canvas-previous;
|
||||
in property <string> adapter: "detecting…";
|
||||
in property <string> backend: "—";
|
||||
in property <string> inference-backend: "detecting…";
|
||||
@@ -1640,6 +1650,41 @@ in property <bool> panel-visible: true;
|
||||
visible: root.total > 0 && root.load-error == "";
|
||||
}
|
||||
|
||||
// TRACES: FR-DSP-4
|
||||
// **The draft, fading out over the sharp frame that
|
||||
// replaced it**, so settling reads as the picture coming
|
||||
// into focus rather than a swap.
|
||||
//
|
||||
// Hidden while drafting — it would be the same picture
|
||||
// twice — and snapped to opaque there, so the fade always
|
||||
// starts from the draft. Only the leaving transition is
|
||||
// animated: a new gesture shows its draft at once. Past
|
||||
// the fade it is transparent and hidden, so a settled
|
||||
// canvas composites exactly one image, as before.
|
||||
//
|
||||
// It fades into whatever sharp frame follows a draft. That
|
||||
// is the settle in every case but one: holding a
|
||||
// comparison within the settle delay of a drag renders the
|
||||
// original straight away, and the last draft of the edit
|
||||
// fades out over it rather than vanishing.
|
||||
previous-frame := Image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
source: root.canvas-previous;
|
||||
image-fit: contain;
|
||||
image-rendering: canvas-image.image-rendering;
|
||||
opacity: 0;
|
||||
visible: canvas-image.visible && !root.canvas-draft && self.opacity > 0;
|
||||
states [
|
||||
drafting when root.canvas-draft: {
|
||||
opacity: 1;
|
||||
out {
|
||||
animate opacity { duration: 150ms; easing: ease-out; }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// The region map, composited over the photograph at the
|
||||
// same fitted rect.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user