196 Commits
Author SHA1 Message Date
davidmann4andautocraft-bot[bot] 1376634ebd Merge pull request #18809
Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
2026-12-02 01:07:07 +00:00
dholzricandClaude Opus 5.5 2d338e8b04 Define Brush/Pattern: grey them while hidden colour channels leave the mask as the picture (#18232)
The desktop treats a masked layer's mask as the target in Composite when
every colour channel is hidden and no alpha channel is shown; the engine
helper now does too, and ignores a shown filter mask as the desktop does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 17:06:14 -06:00
Bobderto 519247ccec Match half opacity when drawing a gradient on a layer mask 2026-12-01 22:46:11 +00:00
dholzricandClaude Opus 5.5 93a9ffa3c9 Define Brush Preset and Define Pattern: greyed while a layer mask is the target (#18232)
With a pixel layer's or a group's layer mask targeted, or an adjustment
layer with its mask active, both items stayed enabled and made a brush
or pattern from the composite. The reference greys them there.

A shared check, pattern_cmds::layer_mask_targeted, now gates
edit.definePattern and brush.defineFromSelection; Define Brush Preset
passes on the brush command's reason.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 14:06:26 -06:00
autocraft-bot[bot] edbbf676fa Merge pull request #18686 2026-12-01 15:26:27 +00:00
autocraft-bot[bot] d00e772692 Merge pull request #18690 2026-12-01 15:26:27 +00:00
autocraft-bot[bot] 4263bf3d9d Merge pull request #18694 2026-12-01 15:26:27 +00:00
yoriswind 5af6fb5e9b Limit deep gradient opacity rounding to Classic 2026-12-01 03:59:46 -08:00
yoriswind d458f5acbb Allow float luma roundoff in the mask control 2026-12-01 03:13:30 -08:00
David MannandClaude Opus 5.5 471cdf4646 Color Replacement: refuse an alpha channel or Quick Mask target at admission too
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 12:05:13 +01:00
yoriswind 0cafa5d862 Use the measured Smooth transparency curve on layer masks 2026-12-01 03:00:58 -08:00
David MannandClaude Opus 5.5 4674495026 Color Replacement: refuse an unpaintable target at admission, before a floating selection drops
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 11:57:31 +01:00
David MannandClaude Opus 5.5 07dc59dd75 Merge origin/main into the batch branch
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 11:47:18 +01:00
yoriswind 099df3d4be Use Normal for unsupported gradient modes on RGB layer masks 2026-12-01 02:36:14 -08:00
yoriswind de81f7b9f4 Use measured half opacity for deep Classic gradient pixels 2026-12-01 02:06:13 -08:00
David Mann 0b58ed23af Merge #18618 into the merge queue batch
Magic Eraser: a contiguous fill stays in the selection's bounding rectangle (#18068)
2026-12-01 10:56:18 +01:00
David MannandClaude Opus 5.5 c69cd1c320 Color Replacement: keep the pressure marker in the live preview; resize target fixed at press
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 10:06:05 +01:00
David MannandClaude Opus 5.5 e03fc040c9 Merge origin/main into the batch branch; pin craft-libs at main 475f6feb (craft-libs#4589 merged)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 10:04:41 +01:00
David Mann fa3b374b3c Merge pull request #18551 from davidmann4/integration-batch-28
Integration batch 28: Fill scripts, Gradient, Warp and Quick Mask
2026-12-01 09:58:33 +01:00
dholzricandClaude Fable 5.2 939a21c85e Magic Eraser: a contiguous fill stays in the selection's bounding rectangle (#18068)
With a selection, magic_eraser found the region on the whole canvas and
only clipped the erase to the selection. A fill could then reach another
selected part by a path outside the selection, and a click outside it
erased inside it.

With a selection and Contiguous on, the region is now found inside the
selection's bounding rectangle, over selected and unselected pixels
alike. A seed outside the rectangle finds nothing and adds no History
state.

Kept as before (not measured): a selection with partly selected pixels,
and Sample All Layers.

One existing test clicked outside the bounding rectangle of its
selection and expected an erase; its click moved inside the selection.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-12-01 01:40:03 -06:00
David Mann 59a4e6a84c Merge origin/main into the batch branch 2026-12-01 06:13:47 +01:00
David MannandClaude Opus 5.5 4beeecd9cd Color Replacement: Tolerance on Pen Pressure scales each dab's tolerance (#17786)
With the brush popup's Tolerance control on Pen Pressure, each dab replaces only the
colours within Tolerance x the pen pressure at that dab. Off, the mouse and Stylus Wheel
keep the full Tolerance. Dabs now carry the input pressure they were placed at, and
`paint.colorReplacement` takes `toleranceControl` (off, penPressure, stylusWheel).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 04:54:13 +01:00
David MannandClaude Opus 5.5 5c96c63fbb Color Replacement: refuse one or two colour channels (#17783)
The tool recolours the full colour composite only. In an RGB document a
press, live stroke or paint.colorReplacement with one colour channel
targeted now gives "Could not use the Color Replacement tool because it
only works in full color modes.", with some but not all channels
"...because the target channels do not cover the composite.": nothing
painted, no History state. All channels still paint; other colour modes
were not measured and keep painting. The check sits in the shared
Color Replacement target refusal, so the canvas alert and the command
error use the same text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:54:06 +01:00
David MannandClaude Opus 5.5 4dd8ef1920 Batch fix-up: Place Along Path fit, reach and tile limit (CodeRabbit on #18551)
- Fit and the end of the path use how far a tile reaches along the path: an upright tile on a vertical path ends 15 px
  past its centre for the 40 x 30 probe, not 20.
- Fit stretches the steps only as far as every tile still ends at or before the path's end, so shrinking tiles (Scale
  progression below 100 %) no longer reach past it.
- Tiles out of reach of the painted area are skipped (a run at a steady size in one jump) and keep their number and
  place, so spacing, progression and mirroring stay as on the whole path: a path starting far off the canvas no longer
  spends the tile limit there and paints nothing.
- A path that needs more than the 100,000-tile limit over the area is refused with a message, rather than filled part
  of the way and reported as done.
- The per-tile colour drift is worked out once per tile, not per pixel.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:46:21 +01:00
David MannandClaude Opus 5.5 289fe5cc14 Batch fix-up: Symmetry Fill dilations are the same for any selection on the canvas (CodeRabbit on #18551)
The range of dilation steps came from the painted rect, so a small selection dropped enlarged copies that still cover
it (a translucent tile's centre pixel changed), and type 6 numbered its copies from the largest step, so the same copy
drifted to another colour when the range changed. The range now comes from the canvas (with the area), and dilated
copies take their own step as the number for the colour drift; the drawing order stays as it was.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:46:21 +01:00
David MannandClaude Opus 5.5 f84e580ebb Batch fix-up: Random Fill along a path ignores the parts out of the area's reach (CodeRabbit on #18551)
A long subpath far off the canvas took nearly all the tiles (and swamped the visible line's share of the arc length),
so the visible line got none. The path's pieces are now clipped to the area grown by Max distance and the largest
tile's reach before the tiles are spread over them; without a path nothing changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:46:21 +01:00
David MannandClaude Opus 5.5 e7c35f7bba Batch fix-up: the dense Spiral edge test checks every selected pixel (CodeRabbit on #18551)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:46:21 +01:00
David Mann 2ca6667b06 Merge PR #18396 at its new head (its centre fix matches the batch fix-up; takes its test and overflow-safe centre) 2026-12-01 02:41:39 +01:00
David MannandClaude Opus 5.5 8d91ad712d Color Replacement: alerts for a mask, adjustment layer, group mask or channel target (#17782)
The tool recolours a pixel layer's full colour composite only. A press on a
layer mask, an adjustment layer (its mask or its content), a group's mask, an
alpha channel or the Quick Mask now opens the reference application's alert
with OK, and paint.colorReplacement returns the same text. The target decides
before the hidden, locked and 32-bit checks. Measured in RGB documents; other
modes and the filter mask keep the generic refusal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 02:37:39 +01:00
David Mann 1747e9c65e Merge #18513 into the merge queue batch
Refuse Art History Brush strokes in Indexed Color and Bitmap (#18506)
2026-12-01 02:04:11 +01:00
David Mann c198d7b96f Merge #17015 into the batch branch 2026-12-01 01:07:06 +01:00
David Mann 6daf9b92a1 Merge PR #18400 at its new head: Fill: Spiral script pattern (#17432) 2026-12-01 00:44:11 +01:00
David MannandClaude Opus 5.5 f5957f4b52 Batch fix-up: CodeRabbit findings on #18039 and #18396
#18039: OK in a script dialog on a pattern Indexed Color can't take now
shows the same alert with OK as the Fill dialog, instead of a plain
notice; a test covers the script path.

#18396: Symmetry Fill turns about the selection's own centre, also when
the selection reaches past the canvas, not the centre of its clipped
part.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 00:43:18 +01:00
David MannandClaude Opus 5.5 4d4324155f Fill: Spiral reaches the covering tiles in the tightest packings (#17432)
Each turn of the spiral now offers only the tiles within reach of the
pixel, found by the law of cosines over the turn's radius band, and the
turns are walked lazily from the outside in. Past the try limit the
topmost tile whose centre lies within half the tile's shorter side,
which covers the pixel however it is turned, stands in, so a covered
pixel is never left transparent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 00:41:19 +01:00
David Mann 79f18d531c Merge PR #18396: Fill: Symmetry Fill script with 33 symmetry types (#17433)
# Conflicts:
#	crates/compose/src/scripted_pattern.rs
#	crates/engine-paint/src/cmd/fill_cmds.rs
#	crates/engine-paint/src/fill_script_brick_tests.rs
#	crates/engine-paint/src/lib.rs
#	crates/ui-egui/src/dialogs/fill_script_ui.rs
2026-12-01 00:33:46 +01:00
David MannandClaude Opus 5.5 f6d6f7309f Batch fix-up: Fill tests after #18135, #18035 and #18039 meet
#18135 gives Quick Mask its own swatch pair, so the Quick Mask grey tests
of #17487 (main) and #18070 now pick their colour after entering Quick
Mask instead of before. #18039 refuses every blend mode but Threshold and
Dissolve and the Content-Aware fill in Indexed Color, so #18035's "other
contents and blend modes stay inside the table" test checks that those
fills are refused and leave the pixels unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 00:31:14 +01:00
David Mann a9e76540b6 Merge PR #18401: Fill: Place Along Path scripted pattern (#17430)
# Conflicts:
#	crates/compose/src/scripted_pattern.rs
#	crates/engine-paint/src/cmd/fill_cmds.rs
#	crates/engine-paint/src/fill_script_brick_tests.rs
#	crates/engine-paint/src/lib.rs
#	crates/ui-egui/src/dialogs/fill_script_ui.rs
#	crates/ui-egui/src/dialogs/fill_script_ui_tests.rs
2026-12-01 00:18:15 +01:00
David Mann 0d525b369c Merge PR #18400: Fill: Spiral script pattern (#17432)
# Conflicts:
#	crates/compose/src/scripted_pattern.rs
#	crates/engine-paint/src/cmd/fill_cmds.rs
#	crates/engine-paint/src/fill_script_brick_tests.rs
#	crates/engine-paint/src/lib.rs
#	crates/ui-egui/src/dialogs/fill_script_ui.rs
#	crates/ui-egui/src/dialogs/fill_script_ui_tests.rs
2026-12-01 00:00:36 +01:00
David Mann af90311ba3 Merge PR #18036: Fill: a scripted colour fill becomes the dialog's colour (#17471)
# Conflicts:
#	crates/engine-paint/src/cmd/fill_cmds.rs
2026-11-30 23:56:52 +01:00
David Mann 2c300da176 Merge PR #18039: Fill: Threshold mode and greyed entries in Indexed and Bitmap (#17476)
# Conflicts:
#	crates/ui-egui/src/dialogs/fill_ui.rs
2026-11-30 23:56:05 +01:00
David Mann 8c2697a1ac Merge PR #18070: Fill: Quick Mask colour fill uses the reference grey weights (#17485)
# Conflicts:
#	crates/engine-paint/src/cmd/fill_cmds.rs
2026-11-30 23:55:51 +01:00
David Mann c2dd8262d8 Merge PR #18398: Fill: Random Fill script (#17431) 2026-11-30 23:55:22 +01:00
David Mann 765bca1b0c Merge PR #18211: Gradient: the Classic gradient Mode list gets Behind (#12011) 2026-11-30 23:55:16 +01:00
David Mann 9672455eda Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/engine-paint/src/cmd/fill_cmds.rs
2026-11-30 23:49:19 +01:00
David Mann 690aceffbe Merge remote-tracking branch 'origin/main' into fix/17433-fill-script-symmetry-fill
# Conflicts:
#	crates/compose/src/scripted_pattern.rs
#	crates/engine-paint/src/cmd/fill_cmds.rs
#	crates/engine-paint/src/fill_script_brick_tests.rs
#	crates/engine-paint/src/lib.rs
#	crates/ui-egui/src/dialogs/fill_script_ui.rs
2026-11-30 23:48:21 +01:00
David Mann 8c79de580b Merge remote-tracking branch 'origin/main' into fix/17432-fill-script-spiral
# Conflicts:
#	crates/compose/src/scripted_pattern.rs
#	crates/engine-paint/src/cmd/fill_cmds.rs
#	crates/engine-paint/src/fill_script_brick_tests.rs
#	crates/engine-paint/src/lib.rs
#	crates/ui-egui/src/dialogs/fill_script_ui.rs
#	crates/ui-egui/src/dialogs/fill_script_ui_tests.rs
2026-11-30 23:47:57 +01:00
David MannandClaude Opus 5.5 d116712677 Fill: Symmetry Fill turns about the selection's own centre (#17433)
A selection that reaches past the canvas kept the centre of its visible
part; it now turns about the centre of the whole selection, while the fill
stays clipped to the canvas. The centre is summed in f64 so a far-off
selection pixel cannot overflow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 23:47:05 +01:00
David Mann b7059306d2 Merge pull request #18049 from davidmann4/fix/17479-fill-multichannel
Fill: write the fill's grey into every channel of a Multichannel document (#17479)
2026-11-30 23:35:12 +01:00
David Mann d4c2ffa00e Merge main into fix/17431-fill-script-random-fill
# Conflicts:
#	crates/compose/src/scripted_pattern.rs
#	crates/engine-paint/src/cmd/fill_cmds.rs
#	crates/engine-paint/src/fill_script_brick_tests.rs
#	crates/engine-paint/src/lib.rs
#	crates/ui-egui/src/dialogs/fill_script_ui.rs
#	crates/ui-egui/src/dialogs/fill_script_ui_tests.rs
2026-11-30 23:34:11 +01:00
David Mann 8b72b67fc8 Merge pull request #18397 from davidmann4/fix/17429-fill-script-cross-weave
Fill: Cross Weave script (#17429)
2026-11-30 23:28:23 +01:00