Commit Graph
12541 Commits
Author SHA1 Message Date
Trevor BrownandClaude Sonnet 5.5 cbd389a504 Triangle tool: tests for hostile and degenerate boxes and for the triangle_live field (#13350)
The hostile-radii test now tells the command guard's internal error from a graceful one, and a new test sends hostile boxes. The vector tests pin zero-size, sliver and tall thin boxes. The format tests cover both fields present, a field holding another kind, and junk in triangle_live.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Model-Effort: Opus 5.5 drove; Fable 5.2 briefed; Sonnet 5.5 wrote at medium
2026-11-12 20:19:03 -05:00
Trevor BrownandClaude Sonnet 5.5 303be52228 Triangle tool: the triangle fills its box, as its own live kind (#13350)
A new live shape kind, LiveShape::Triangle { rect, corner_radius }, draws an isosceles triangle that fills the dragged box (apex at the top centre, then bottom right, bottom left). The engine no longer turns a triangle into an inscribed 3-sided polygon. Triangles saved before this are 3-sided polygons and keep that geometry.

The .pcraft manifest stores a live triangle in a new optional triangle_live field beside live (as arrow_live does), so older builds open the file and show the saved path. PSD export writes no vogk for a triangle, as for polygons.

Arms the new kind forces: live_kind, the axis-aligned transform, params, the corner radius widgets and the Properties Shape section (Corner radius only). Shift keeps today's equilateral triangle, sent as its tight box.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Model-Effort: Opus 5.5 drove; Fable 5.2 briefed; Sonnet 5.5 wrote at medium
2026-11-12 19:27:36 -05:00
David Mann 43313b61e0 Merge pull request #13523 from TrevorBrown-dev/fix/rectangle-radius-next-shape-13338
Rectangle tool: the Radius field sets the next rectangle, not the active shape (#13338)
2026-11-13 00:50:51 +01:00
David Mann 8b0c0fcf3d Merge pull request #13485 from ljkx/fix/12489-perspective-crop-mirrored-quad
algo, engine, ui: Perspective Crop commits a quad mirrored on one axis (#12489)
2026-11-13 00:50:39 +01:00
David Mann 594f392414 Merge pull request #13484 from ljkx/fix/13060-pencil-auto-erase-cmyk-inks
engine: Pencil Auto Erase probes a CMYK pick with the picked inks (#13060)
2026-11-13 00:50:27 +01:00
David Mann 604df4c636 Merge pull request #13481 from ljkx/fix/retouch-tools-refuse-indexed-bitmap
engine, ui: Burn, Sponge, Blur and Smudge refuse Indexed Color and Bitmap (#12673, #13033, #12656, #12967)
2026-11-13 00:49:28 +01:00
David Mann 12334b6dc6 Merge pull request #13379 from Bobderto/codex/13340-rectangle-click
Keep Create Rectangle closed inside the active live rectangle
2026-11-13 00:49:16 +01:00
David Mann 616ec3fab6 Merge pull request #13292 from TrevorBrown-dev/fix/add-anchor-cursor-12729
Add Anchor Point: the pen with "+" only over a segment, a black arrow elsewhere (#12729)
2026-11-13 00:47:01 +01:00
David Mann 56fb739895 Merge pull request #13411 from NaufalDzz/fix/issue-13270
Path Selection: a drag on a shape moves it, not the targeted saved path (#13270)
2026-11-13 00:46:48 +01:00
David Mann 4a059d97c5 Merge pull request #13546 from storytold/fix/windows-rustc-response-file
ci: let Cargo handle oversized Windows rustc commands
2026-11-12 23:39:26 +01:00
skylar taylor-barrick 337dbff472 Merge pull request #12441 from ElNeMeR70/fix/linux-sandbox-cgroup-memory-12426
fix(raster): handle empty /sys/fs/cgroup mount point and empty mountinfo source in Linux sandboxes
2026-11-12 16:14:22 -06:00
skylar taylor-barrick 8338b27238 Merge remote-tracking branch 'origin/main' into fix/windows-rustc-response-file 2026-11-12 21:57:28 +01:00
RickiNano e660b4906b Clear the clippy 1.100 lints that fail the gate on main (#13531) (#13535)
* Clear the clippy 1.100 lints that fail the gate on main (#13531)

Clippy 1.100.0 flags needless_range_loop in cms synth.rs (the gate
failure on main), algo photo_util.rs and an engine multichannel test,
and, on Windows only, needless_bool in format noreplace.rs, where the
cfg(unix) branch compiles away. Each loop now iterates the slice it
indexed, with the same values in the same order.

* Clear the Linux-only clippy 1.100 needless_bool lints (#13531)

paths_match in ui-egui and is_redirect in the app ended with a
cfg(not(windows)) branch that is just `false`, which clippy 1.100
flags on Linux. Each platform's branch now returns the whole
comparison: the same results, in the same order.
2026-11-12 14:56:57 -06:00
David Mann 134208d7fd Merge pull request #13371 from RickiNano/fix/13353-triangle-layer-name
Triangle tool: shape layers are named Triangle N, not Polygon N (#13353)
2026-11-12 21:21:04 +01:00
skylar taylor-barrick cbcd62c8d1 ci: let Cargo handle oversized Windows rustc commands 2026-11-12 21:09:18 +01:00
David Mann 60c4d856dd Merge pull request #13500 from RickiNano/fix/12838-freeform-pen-anchors
Freeform Pen: anchors on the trace's turning points, rounded joins (#12838)
2026-11-12 19:19:49 +01:00
David Mann 6381e52212 Merge pull request #13135 from TrevorBrown-dev/fix/delete-anchor-shown-only-12769
Delete Anchor Point: only a shown anchor is deleted; a hidden one is selected first (#12769)
2026-11-12 19:18:29 +01:00
David Mann eadefc60ae Merge pull request #13283 from RickiNano/fix/13243-line-shift-snap
Line tool: Shift snaps to 0/45/90° with the reference application's end points (#13243)
2026-11-12 19:18:15 +01:00
Trevor BrownandClaude Sonnet 5.5 28d6816278 Rectangle tool: the Radius field sets the next rectangle, not the active shape (#13338)
The Rectangle tool's options-bar Radius field showed the active shape's first radius and, when changed, ran shape.edit on it (a History state). It now shows and sets only the tool's own radius, which the next drawn rectangle takes. The Properties panel and the on-canvas corner widgets still edit the active shape, and the Path Selection / Direct Selection Radius field is unchanged.

Tests in rectangle_radius_target_tests.rs: the field leaves the active shape alone (no History state), the next rectangle takes the typed radius, the field shows the tool's radius, and the Path Selection / Direct Selection field still edits the active shape.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Model-Effort: Opus 5.5 drove; Fable 5.2 queued; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-12 12:53:59 -05:00
Alan Rockefeller f75cfd5a56 Clone Stamp and Healing Brush clone from a source set in another open document (#10381)
* Clone Stamp and Healing Brush clone from a source set in another open document

Alt-clicking a clone source in one document and painting in another sampled the
painted document at the source point: a clone source slot held a point and a layer
but not the document. Slots now record the document (and its layer) they were set
in, and painting elsewhere samples that document, as in Photoshop.

- Engine: CloneSource gains `document` (serde default, so older slots read as
  "the document being painted"). Clone Stamp, Healing Brush, the live stroke, the
  Pattern Preview wrap and the brush-tip preview read the source document. Pixels
  are converted to the painted document's colour mode and depth like Edit > Paste
  (no ICC conversion, same as Paste). Current Layer / Current & Below use the
  layer the source was set on (that document's active layer if it was deleted);
  All Layers uses its composite.
- A source whose document was closed is an error asking for a new source, and
  stores no aligned anchor, instead of silently sampling the wrong document.
- cloneSource.set takes an optional `"document": index` (with `source`);
  cloneSource.list and set report each slot's document index.
- UI: the Clone Source panel names the source document (or says it was closed),
  the source crosshair isn't drawn over another document, and the brush preview
  cache includes the source document's revision.

Tests: engine tests for 8/16/32-bit with and without wrap, colour-mode conversion
(Gray > RGB16, RGB > CMYK), sampled layer, Healing Brush, live stroke vs commit,
preview, closed/invalid documents and cloneSource.set/list; a UI test that
Alt-clicks in one document and paints in another.

* Clone test: the aligned stroke past the smaller source document's edge leaves the destination unchanged

Review follow-up: with "aligned": false the stroke sampled inside the source, so it didn't test the edge its comment named, and nothing was asserted.

* Clone Stamp / Healing Brush: an empty Clone Source slot refuses to paint

clone_params fell back to ui.clone_source / ui.clone_offset when the active
slot was empty. Those coordinates carry no document, so after Alt-clicking in
one document and picking an empty slot in another, the stroke read the first
document's coordinates from the second one's pixels.

* fix: reject stale cross-document clone previews

* Clone Source: a copy opened after the source document closed isn't its source

A native copy keeps its document's ID, and a reopened document may keep its ID. A slot set in
a document that was then closed resolved that ID again once a copy was open, and painted from
the copy instead of reporting the closed source (CodeRabbit, clone_source.rs).

Session::close now marks the slots set in the closing document closed (CloneSources::forget_doc,
next to the other per-feature forget_doc calls). A closed slot refuses the stroke and its live
preview with the closed-source error, shows "Source: document closed" in the panel, reports no
`document` in cloneSource.list/set, and draws no overlay or crosshair, whatever document has the
ID now. Setting a new source clears it.
2026-11-12 18:00:54 +01:00
Khawar Zamman Wani aa6f0d1b73 Object Selection: New, Add, Subtract and Intersect mode buttons (#12853) (#13195)
* Object Selection: New, Add, Subtract and Intersect mode buttons (#12853)

The options bar shows the four mode buttons before Object Finder. Clicks and
rectangle drags combine in the bar's mode, with Shift adding, Alt subtracting
and Shift+Alt intersecting (rectangle drags used to subtract with Shift+Alt).
In New mode a click inside the selection deselects and a drag inside moves
the outline, as the marquees do.

* Object Selection: Cmd stays the Move tool inside the selection; update tests for New-mode Deselect

* Object Selection mode tests: a Cmd-drag floats the pixels and lands as Move on the drop

* Object Selection: keep Object Finder off's Quick Selection dab and rectangle

A press inside the selection drags the outline only with Object Finder on;
with it off the click is still a Quick Selection dab and the drag a
rectangle. The dab subtracts with Alt again, including Shift+Alt.

* Object Selection: keep the Indexed/Bitmap alert for a press inside the selection

The New-mode outline gesture skipped finish_object_selection, so a click
deselected and a drag moved the outline without the tool's alert (#12867).
2026-11-12 18:00:25 +01:00
Khawar Zamman Wani 4033472df6 Layers panel: off-screen group rows paint nothing (#13117) (#13127)
* Layers panel: off-screen group rows keep only their disclosure widget (#13117)

A group row scrolled out of view painted its whole row every frame. It now
registers only its disclosure triangle (hit area, click, tooltip, accessibility
label) and returns, like any other off-screen row (#125).

* Add layers_panel_bench: Layers panel frame time with many groups (#13117)

Idle frames of the app in a CPU harness on a document of N collapsed groups
(or plain layers, or expanded groups), with the panel scrolled to the top.

* Layers panel: keep a row whose eye-column menu is open (#13127 review)

The eye column's colour menu is the eye response's own popup, which
resp.context_menu_opened() doesn't see. A group row with it open now stays
whole when scrolled out of view, as egui closes a popup a frame doesn't show.
Also documents the bench example's helpers.

* Layers panel test: an off-screen group row adds no text shapes (#13127 review)
2026-11-12 18:00:04 +01:00
Khawar Zamman Wani ea3bd7e022 Layers panel: skip off-screen Smart Filter rows (#13118) (#13198)
* Layers panel: skip off-screen Smart Filter rows (#13118)

Filter rows scrolled out of the list keep their place but no longer paint,
register widgets or take drops, as effect rows already do. A filter row takes
a reorder drop only where the list shows it, as masks do since #10485, so a
filter released over the panel header no longer lands on a row scrolled
under it. A selected filter stays selected while scrolled away.

* Re-run CI
2026-11-12 17:59:35 +01:00
Khawar Zamman Wani f88fde3db0 Move: frame and snap a dragged group (#13418) (#13429)
* Move: frame and snap a dragged group (#13418)

A group dragged with the Move tool showed only the arrow: the moving box
came from snap::layer_rect, which skips groups, so a selected group got no
Move gesture, no box, no snapping and no Smart Guides.

Measure what the move carries instead: the move targets, a group as the
layers in it (whole, even with a selection), an artboard as its board.
Keep the targets and everything inside them out of the snap targets, so a
group doesn't snap to its own layers' starting edges.

* Rename the group drag test helper so it doesn't clash with drag()

* Move: keep linked layers as snap targets while selected pixels move
2026-11-12 17:58:41 +01:00
Alan Rockefeller dbde10cfb1 Camera Raw: draw over a full-screen (or Wayland maximized) main window instead of freezing (#9069)
Camera Raw's window is an immediate viewport: it takes input and redraws
only while the main window draws a frame. Opened over a full-screen main
window, the new window covers it (Hyprland hands it the full screen, or
the maximized state), the compositor sends the hidden main window no more
frame callbacks, and the dialog freezes: sliders don't move and the app
looks hung until the main window is visible again.

While the main window is full screen, or maximized on Wayland, the dialog
is now drawn over the main window, as the web build already does.
Elsewhere a maximized window keeps Camera Raw in its own window.

Tested on Hyprland 0.56 (Omarchy): Super+F and Super+Alt+F both froze
the dialog before (a control-channel slider change timed out after 60 s
or took 48 s) and respond normally now.
2026-11-12 17:57:40 +01:00
RickiNano 4d1cc4b6e5 Freeform Pen: a failed short fit no longer stops the reach (#12838)
A few samples can fit worse than more, so a failed doubling step looks one
step further before it stops. On whole-pixel samples the vee now gets the
reference application's four anchors at Curve Fit 2 (was five); the Curve
Fit 2 tests run on both the given and the whole-pixel strokes.
2026-11-12 17:42:38 +01:00
RickiNano 16c8e5c4d1 Freeform Pen: anchors on the trace's turning points, rounded joins (#12838)
fit_trace places the Freeform Pen's anchors as the reference application
does on the issue's sample strokes: corners only at turns sharper than
80°, each run fitted one segment at a time as far as one cubic follows the
trace, ending on the first turning point in x or y within reach, with the
segment's turn bounded by Curve Fit (75° per px, at most 150°). The end
handle of each piece is fitted, not estimated. A closed trace keeps its
release point as an anchor. Make Work Path keeps its fitting.

Curve Fit 2: sine 6 anchors on the peaks, circle 5, open circle 4, vee 4
smooth, line unchanged; 0.5 and 1 px give more anchors.
2026-11-12 16:41:55 +01:00
RickiNano 5c03bb70b5 Merge remote-tracking branch 'origin/main' into fix/13243-line-shift-snap 2026-11-12 16:25:53 +01:00
David Mann 7ca5a9c40f Merge pull request #12317 from SBaksa/reset-tool-keeps-options
Reset Tool keeps Patch Structure/Color and Content-Aware Move Mode
2026-11-12 13:51:08 +01:00
Trevor Brown d6359dd43d Merge remote-tracking branch 'upstream/main' into fix/delete-anchor-shown-only-12769 2026-11-12 07:33:54 -05:00
David Mann bc778cf4af Merge pull request #13442 from wanikhawar/fix/ellipse-path-menus-13235
Shape tools: Path operations, alignment and arrangement menus
2026-11-12 13:28:08 +01:00
David Mann 1f0bd2f807 Merge pull request #13179 from TrevorBrown-dev/feat/anchor-tools-path-menu-12771
Delete Anchor Point and Convert Point: right-click opens the path menu with the point's entry on top (#12771, #12744)
2026-11-12 13:27:56 +01:00
David Mann 7890f7d6c3 Merge pull request #13352 from RickiNano/fix/13336-rect-radius-range
Rectangle tool: Radius takes 0-150000 px and alerts past it (#13336)
2026-11-12 13:27:44 +01:00
David Mann 4901167120 Merge pull request #13081 from TrevorBrown-dev/fix/delete-anchor-drag-segment-12767
Delete Anchor Point: dragging a segment moves it, as Direct Selection does (#12767)
2026-11-12 13:27:33 +01:00
David Mann e0ad19b0f8 Merge pull request #12235 from hectorviov/fix/perspective-crop-cursors
Perspective Crop: hover cursors say what a press does
2026-11-12 13:27:21 +01:00
David Mann 2b7977accb Merge pull request #9301 from DuBearte/feat/9269-black-white-auto
feat: Black & White Auto (#9269)
2026-11-12 13:27:10 +01:00
David Mann e165933772 Merge pull request #12430 from ljkx/atn-fit-image
Actions: map File › Automate › Fit Image (#10723)
2026-11-12 13:26:58 +01:00
David Mann a037e55a7f Merge pull request #9952 from ashokram-si/feat/jpeg-options-size-readout
JPEG Options: show how big the file will be (FILE-215-19, #7843)
2026-11-12 13:26:45 +01:00
Trevor BrownandClaude Sonnet 5.5 643d156494 Delete Anchor Point: select the follower at the history cap (#12769)
At the History limit a successful deletion records one step and evicts the oldest, so the step count did not change and the click skipped selecting the anchor that followed the deleted one. `apply` now reports whether the engine ran the edit, and the click selects the follower on success instead of comparing step counts. Adds a test that fills History to its cap first.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-12 05:50:43 -05:00
Khawar Zamman Wani 23a0772776 Custom Shape: refuse an operation for a shape that can't be one component
Its parts would all take the operation and change the shape.
2026-11-12 15:39:41 +05:30
ljkx da6f09ce70 docs/atn.md: Fit Image leaves a fitting document unchanged only with limit (Don't Enlarge) 2026-11-12 11:03:28 +01:00
ljkx 8943be1f4f engine, ui: Burn, Sponge, Blur and Smudge refuse Indexed Color and Bitmap (#12673, #13033, #12656, #12967)
The colour-mode check `mode_refusal` in retouch_cmds/dab.rs only knew
paint.dodge and paint.sharpen, so the other dab tools painted into Indexed
Color and Bitmap documents, where the reference application refuses with an
alert. Add their arms (both `dab_cmd` and the live stroke `LiveDab::begin`
call it, so nothing is previewed either), and name the tools in the canvas
`mode_tool_name` so a press opens the same alert with OK.

Multichannel and Duotone were not measured and keep today's behaviour.

Tests: one engine file per tool (refusal text from the command and the live
stroke, pixels and History unchanged; RGB/Gray/CMYK/Lab at 8/16/32 bits,
Multichannel and Duotone keep working) and a canvas alert test for all four.
The engine refusal tests fail without the fix.

Fixes #12673
Fixes #13033
Fixes #12656
Fixes #12967
2026-11-12 10:49:55 +01:00
ljkx b374e27b9d engine: Pencil Auto Erase probes a CMYK pick with the picked inks (#13060)
In a CMYK layer the stroke renderer paints a foreground picked as CMYK as
those exact inks (`StrokeRenderer::composite`, #4344), but `apply_auto_erase`
built its probe from the foreground's RGB stand-in converted back to CMYK.
For a rich black (or any ink mix the RGB doesn't round-trip to) the probe
never matched the stroke's own pixels, so a stroke starting on them painted
the foreground again instead of the background.

The probe now puts the picked inks in, under the same condition the
renderer uses (CMYK target, inks picked for this foreground). Commit and
live stroke share `apply_auto_erase`, so both are fixed.

Test: a rich-black pencil line in a CMYK document, then an Auto Erase
stroke starting on it paints the background, live and committed. It fails
without the fix.

Fixes #13060
2026-11-12 10:49:50 +01:00
ljkx ec55bed7b0 algo, engine, ui: Perspective Crop commits a quad mirrored on one axis (#12489)
`convex_quad` accepts a quad only when it is wound clockwise on screen, so a
Perspective Crop box flipped on one axis (an Alt+corner drag past the
opposite corner along x only), which is convex but wound counter-clockwise,
was drawn red and refused by `image.perspectiveCrop` and `quad_to_rect`. The
reference application commits it mirrored, each corner mapped as it lies.

Add `convex_quad_any_winding` (the same angle and area limits, either
winding; self-crossing, degenerate and non-finite quads stay invalid) and
use it for Perspective Crop only: the `corners` check and its error text,
`quad_to_rect`, and the overlay's validity check. The homography already
maps each corner onto its own rectangle corner, so the crop comes out
mirrored. Perspective Warp steps keep the clockwise-only `convex_quad`;
clicked corners are still sorted clockwise and commit upright; a box turned
180 degrees still commits upside down.

Tests: algo (a counter-clockwise quad maps corner to corner; bow ties,
collinear, sliver and non-finite quads stay refused), and the new
perspective_crop_mirrored_tests.rs (the measured Alt-drag case commits
mirrored and is drawn valid, the command takes counter-clockwise corners,
clicks commit upright, 180 degrees upside down, invalid quads stay red).
The mirrored cases fail without the fix.

Fixes #12489
2026-11-12 10:49:46 +01:00
Khawar Zamman Wani 4b16507738 Custom Shape: an operation adds the shape to the active shape layer
shape.create with addTo keeps a component's joined subpaths (holes)
joined, so a custom shape's hole doesn't become a component of its own.
2026-11-12 14:30:25 +05:30
Dan d3e162a392 Merge remote-tracking branch 'origin/main' into codex/13340-rectangle-click 2026-11-12 08:45:19 +00:00
Dylan M. Taylor 74330157cb Use craft-psd for PSD/PSB format code (#13414)
* Use craft-psd from craft-libs; remove crates/psd

* Regenerate the scorecard (28 crate roots)

* Take craft-psd at craft-libs 55d120f2

* Regenerate lockfile for current shared format crates

* Pin shared format crates to current craft-libs main

* Match brush import cap to shared decoder budget

* xtask: update layer fixtures after PSD extraction
2026-11-12 02:53:54 -05:00
Dan e54921b297 Retry CI after the Type options bar test flake 2026-11-12 07:53:06 +00:00
Trevor BrownandClaude Opus 5.5 82fff60e0e Keep main's delete_anchor_alt_tests module test-only after the merge
The merge with main left `mod delete_anchor_alt_tests;` without its
#[cfg(test)], so the test module was built into the library.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Model-Effort: Opus 5.5 drove and fixed
2026-11-12 02:47:42 -05:00
Khawar Zamman Wani cc06433f0a Path mode's default Exclude in the custom-shape test; use layer.new.layer 2026-11-12 13:09:59 +05:30