- tools.setBrush keeps a stored tip that loaded only now instead of the unloaded one it compares equal to
- Session::move_document moves the documents generation, so the Window menu follows a reorder
- The rule facts key on every open document's revision and the scratch read-error generation
- The Layers panel thumbnails key on the scratch read-error generation
- The Pattern Fill dialog owns its swatch textures until it closes
- The style library snapshot is derived, so the Styles panel and Layer Style dialog replay
Co-Authored-By: Claude Opus 5.5 <[email protected]>
photocraft-paint's BrushSettings::tip is a Tracked<TipShape>; tools.setBrush keeps its revision when the new brush's
tip equals the old one. The options bar's field takes the presets, the tip and a BrushFace (size, hardness, angle,
roundness) as props instead of the whole brush, so an Opacity or Flow write replays it. Trial:
brush_settle_trials.
The engine's ToolState.brush and ToolState.presets are Tracked, so a memoized view that shows them keys on their revisions; photocraft-paint's brush types derive PlainData.
PhotoCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (next branch): shell, dock and panels, hosted dialogs, keyboard, focus, IME and pointer routing, the canvas's view commands, themes and tokens. The engine, document model, file formats, commands and automation stay. PhotoCraft pins storytold/craft-libs next.
Once time had passed between two input points, a later report with the
same timestamp still took the untimed per-point pull (90 % of the way at
10 % smoothing), so the brush jumped. A timed stroke now remembers it is
timed, and a report with no time since the last one leaves the brush where
it is. Untimed input keeps its per-point pull. CodeRabbit finding on #12246.
Co-Authored-By: Hector Villarreal <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The measured lag (#11888) is by stroke time, so it needs timestamps. A stroke without
them (a control-client or script paint.stroke, an old file) was never measured and
took one step per point with the pull 1 - amount; the new curve made that 31 % at
the default 10 %, so a two-point stroke stopped a third of the way and 58 engine
tests (brush_clear_background_tests, mixer_live_tests, brush_cmds tests ...) failed
in the corpus job. Untimed points keep 1 - amount again; timed ones use the measured
curve. Test: strokes_without_timestamps_keep_their_per_point_pull.
CodeRabbit's nitpick on retouch_cmds/tests.rs: the live hand-off test also runs a
smoothing case with Catch-up on Stroke End.
main's #8842 test smooths a 700 px stroke at 49 %; with the measured lag the brush
ends about 150 px short, so its end cap fell inside the checked span and read as
an opacity jump. The test now uses catch-up on stroke end.
Co-Authored-By: Hector Villarreal <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Exponential smoothing's pull per 16 ms step comes from a time constant
fitted to the reference's lag (tau = 314 ms x amount^0.864: a 200 px
drag in 40 moves 10 ms apart ends about 19 px short at 10 % and 76 px
at 50 %). The pulled string is 300 px at 100 % (150 px at 50 %), and in
Pulled String Mode Catch-up on Stroke End no longer jumps the brush to
the release point. Existing tests that pinned the old lag and string
length are updated.
Integrate the merged cross-document implementation while retaining picked-layer sampling, ICC and source coverage, preview strength, and offset fixes. Preserve upstream explicit preview mappings and closed-document state, and adapt regression fixtures and mode/layer lifetime expectations.
apply_color_replacement and apply_mixer_stroke return a Result since #11070.
Two tests that landed on main after that PR's CI ran still dropped it, so
clippy's unused-must-use lint fails the gate on main.
* paint: refuse a sequential-dab stroke whose working copy is too large
apply_dab_stroke read the whole rectangle enclosing a stroke's dabs into
two dense f32 copies (and a third for the mix), sized by the area
between the dabs rather than what they paint. Two distant points asked
for gigabytes on a sparse document.
Check the three planes against a 4 GiB budget (1 GiB on 32-bit) before
reading, and paint nothing past it.
* address review: apply_dab_stroke returns Result so over-budget dab strokes fail with 'stroke too large'
* fix tests: apply_dab_stroke returns a Result
* fix tests: handle the Result of the dab-stroke functions
craft-cms was extracted from crates/cms (storytold/craft-libs#779), and both
copies changed afterwards. storytold/craft-libs#PRNUM ports the 41 commits made
here since the extraction, so the shared crate now has everything this copy
had, and PhotoCraft depends on it.
craft-cms returns errors where the local crate panicked on caller input:
transforms, tables and LUT constructors return Result. Call sites propagate
the error where the function already returns one, and fall back where the
arguments are fixed by construction (each with a comment saying why).
Lut3d's fields are private there; the proof and HDR display table is built
with Lut3d::from_fn.
The pin is the head of the craft-libs branch and moves to main when that
pull request merges.
The load's supply is a length of stroke, but the dab used the amount left at the dab
before: depletion ran after the deposit. With a wide spacing (35 px tip at 1000 %: dabs
at 30, 380, 730) the dab 700 px into a 390 px supply still painted solid. The distance
update now runs before the dab deposits; the first dab is still at distance zero.
Test: a_dab_deposits_the_supply_left_at_its_own_distance (254 at x 730 before).
The Smudge options bar gets Mode: (Normal, Darken, Lighten, Hue,
Saturation, Color, Luminosity; tooltip "Painting Mode"), first after the
brush controls. `paint.smudge` takes `mode` and refuses any other name;
the stroke sends it and Reset Tool sets Normal.
With a Mode other than Normal each dab's smudged colour is blended with
the pixel from before the stroke the way a paint colour would be, and
laid down through the tip's coverage. 8-bit RGB only: other colour modes
and depths were not measured and keep smudging as Normal. Blur and
Sharpen are unchanged.
Co-Authored-By: Claude Fable 5.2 <[email protected]>