Conflicts with main's batch #9880:
- psd file.rs / layer.rs: #5287 (PSB by encoded size, RLE tables widened on
promotion) against #6583's lazy reader. Main's new widening and length code
read `.data`, which #6583 leaves empty while the bytes stay in the source;
it now goes through `encoded()` / `encoded_len()` (also the auto-merged
lines in `rle_widening`, `encoded_len` and `LayerRecord::write`), and the
lazy reader sets `write_as_psb: false`. New test
`a_lazy_psd_promotes_to_the_same_psb_as_an_eager_one`: a lazily read PSD
writes the same PSB bytes as an eager one; it fails with a `.data` read.
- direct_select.rs / vector_ui.rs: #9321's Type Path and #6353's hidden
Work Path both kept.
- io tests main.rs: both modules. scorecard.md regenerated (12 of 181);
ui-parity.md and gaps.md follow it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CodeRabbit on #9775: newVideoLayerFromFile placed the layer while its content was still empty, so an active artboard always took it and clipped footage centred elsewhere; the first frame is now the content before placement, as in frames_to_layers (footage_off_the_active_artboard_stays_out_of_it fails without it). The merge also left a second check_group_depth ("Duplicate Layers") before main's "Copy Layers" one in layer.copyToDocument, so main's message could never show; it is removed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CodeRabbit on #9775: paint.stroke with fill:true builds the coverage, its feathered copy, the selection read and the mask over the region, up to the whole canvas (file.new allows 300000 x 300000), with infallible allocations that abort the process when memory runs out. The peak is now reserved through the fallible allocator first, and the selection is read through it; fill_survives_allocation_failure fails without this (the error came from a later blend).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A new layer with an open group active went above the group whenever the
group had any lock (all, pixels, transparency or position). The
reference application puts it inside, on top of the group's layers, even
when the group is locked with Lock All. Locks no longer keep New Layer,
New Group, adjustment and fill layers out. Layers that are edited right
after they are made (Type, Shape, Place's transform box, Paste, the
Gradient tool's live gradient, video layers, Render, Vanishing Point, a
new frame) take Place::AutoEditable and keep the PR's rule: they go
above a locked group, as before.
Stamp Visible with an open group active put the stamp inside the group,
where the group's opacity, mode or mask applied to the composite a
second time. The reference application puts it directly above the
group; with a layer inside the group active it still lands above that
layer, inside the group.
Co-authored-by: SckraT <70698629+SckraT@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main moved the engine commands into crates/engine/src/cmd/ and the
dialogs and panels into submodules. The PR's placement calls follow
them, and main's new insert sites (new_adjustment in adjust_params.rs,
Place in file_cmds/open.rs, shapes in vector_cmds/shape.rs) use
layer_place::insert_new like the PR's originals. The New Group dialog
moves to dialogs/new_group_ui.rs; the Layers panel flyout's New Group…
opens it.
Main's Session::precheck now also checks layer.new.group's and
layer.new.groupFromLayers' new params (name, color, mode, opacity,
position), so precheck_agrees_with_execute holds. Main had since added
"New Group…" to every catalog: the PR's duplicate rows are dropped.
Main's newer tests that made a layer with an open group active now
open the group last, as the PR did for the older ones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Character section: a style picked under a family's ">" with type layers
selected set the layers but not the style for new type (the options bar
did both). Pick "Inter > Thin" in Properties > Character: new type stayed
Regular.
- Faux bold: a pointed tip moved r/sin(half its angle) along its bisector,
uncapped (3.9 r at 30 degrees, an A apex grew a spike), and tips sharper
than about 20 degrees did not move at all. Every tip now moves at most
2r, continuously; inner corners (the crotch of a V) keep their exact
miter.
- Faux bold: each point searched past runs of coincident points for its
neighbours, O(n^2); a contour of 50 000 copies of one point took ~8 s per
glyph. Neighbours now come from one O(n) pass over the runs.
- prefs.reset {"path":"type"} and Preferences > Type > Reset Section wiped
the favourite fonts; they are kept now (type.favoriteFonts by name, or
Reset All, still clear them).
- An expanded family whose own row scrolled out of view lost its style
rows, so the list below jumped up.
- Show Similar Fonts re-sorted around each font an arrow step applied, so
Down went back and forth between two fonts; the list now compares with
the font current when the filter was turned on (or the menu opened).
- Docs: an uninstalled favourite is kept but not listed; FAUX_BOLD_RADIUS
and the raster budget describe the thickened outline; the unused
"Recent font list" rows are gone; docs/scorecard.md regenerated (the
favourite fonts are one more setting).
Co-authored-by: D-monized <341904702+D-monized@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dialog remembered the last Width/Height: make a 1080x1350 board from one
layer, then open it for a 20x30 layer and press OK, and that layer got a
1080x1350 board too. It also opened at 0 and an empty Name. It now starts at
the selected layers' size and the next "Artboard N" every time, as in the
reference application. `{"height": -0.4}` rounded to 0 and kept the bounds;
negative sizes are now refused before rounding.
Co-authored-by: DuBearte <130190089+DuBearte@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fill_region called fill_cmds::blend_color_mask without the picked-inks
parameter main added, so the PR no longer compiled; it now passes the
brush's picked CMYK inks, as Edit > Fill and Edit > Stroke do, so a
colour picked as CMYK 100/0/0/0 fills a CMYK document with those inks
(where it covers fully; partial coverage blends through RGB, as there).
The soft fill's working bounds were padded by ceil(sigma)+2, but the
feather reaches ceil(3 sigma): a 40 px square filled with size 40,
hardness 0 ended in a hard step from ~0.1 to 0 at 1 sigma + 2 px. The pad
now comes from selection::feather_reach.
Tests through paint.stroke: fill_soft_edge_has_no_step,
fill_paints_a_cmyk_pick_with_the_picked_inks,
fill_works_on_cmyk_and_16_and_32_bit.
Co-authored-by: scott <1591011+dottedt@users.noreply.github.com>
Co-authored-by: echelon <39263+echelon@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged at the fix-up commit before its main merge (362947695d); the
conflicts with the batch are resolved here: psd_import.rs keeps both
sides' tests, tiff_layers.rs takes ImageData::new.
Listing every photocraft_raw extension also picked up CR3, ORF, RAF, RW2,
SRF and SR2. The raw decoder can't read CR3, compressed ORF and RAF, or RW2
raw formats other than 3, 4 and 5 yet; import then falls back to the
embedded JPEG preview with only a warning, so a folder batch would process
the thumbnail silently. The folder list now takes the raws whose usual files
decode (DNG, CR2, NEF, NRW, ARW, PEF), and the test pins both sides.
Port of the reviewed fix-up 202ce9c2a (davidmann4/photocraft pr-9097-fixup)
to this batch's file layout: same changed lines, in file_cmds.rs instead of
main's later file_cmds/paths.rs split.
Co-authored-by: .CooCoo <1206598+dotCooCoo@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Retry printer enumeration after a busy result and restore the available printer controls without reopening the dialog. Cover opening and drawing the dialog while the spooler is held, then drawing it after release.
Return an empty or unsupported result when the spooler lock is held and no matching cached printer list exists. Preserve the source-specific cache and cover empty and mismatched caches with regression tests.
Merge current main and move the Print dialog changes into its extracted modules.
The feather's ⌈3σ⌉ truncation radius was written out in the blur and again in two engine callers: the windowed marquee and lasso feather (#9794) and the canvas-edge padding of Select › Modify › Feather. selection::feather_reach returns it from the blur's own σ rules, and both callers use it, so a change to the blur's reach can't leave them behind. Output is unchanged; a test pins that the feather leaves everything past its reach at zero.
Resolves the move of crates/engine/src/selection_cmds.rs to cmd/selection_cmds.rs: the two hunks apply at the new path, and modify_window.rs with its tests moves under cmd/selection_cmds/.
The Type Path branch in edit_path caught every `"name":"layer"` edit of a
type-on-a-path layer, including edits of its targeted vector mask: Direct
Selection showed the mask, but a drag moved the Type Path by the mask's
knot indices and left the mask as it was. On main the same command edits
the mask, and path.info / path.get / path.transform still read the mask.
`"name":"layer"` now keeps that meaning: it edits the vector mask when
the layer has one, and the Type Path only when it has none or with
`"typePath": true`, which Direct Selection sends for the Type Path
(PathRef::TypePath). path.list reports the Type Path under its own
`typePath` key, so `layerPath` still names the vector mask, and an edited
Type Path keeps the knot cap type.attachToPath enforces. Both points were
found by CodeRabbit.
The canvas also draws the Type Path with the other tools, as it does a
shape's path: the Pen's Auto Add/Delete edits it, and before this a Pen
click on the baseline added or deleted anchors the user couldn't see.
Co-authored-by: DuBearte <130190089+DuBearte@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zlib-rs maps level 1 to deflate_quick, which writes static Huffman blocks
only, so every Compression::fast() caller (PDF export and print, brush
presets, PNG Fast) wrote 5-32% bigger streams than miniz's level 1 did.
Level 3 is the lowest level that is never bigger than miniz level 1 on the
docs/images photos, raw and Up-filtered (level 2 was +0.9% on one); it is
0-16% smaller and takes 1.2-3.4 times as long. The new test exports a
noisy-gradient RGB document as PDF and checks the image stream against
miniz level 1 of the same samples: 603007 vs 547315 bytes with fast(),
passes with level 3. The PR's doc no longer says the levels are unchanged.
Main moved the io integration tests into crates/io/tests/it/, so the new
deflate_compatibility.rs moves there and uses crate::common.
Co-authored-by: Rene Leonhardt <65483435+reneleonhardt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The i18n coverage scan and prefs_usage stopped reading a file at its first `#[cfg(test)] mod`. A split parent declares `#[cfg(test)] mod tests;` before the rest of its code, so the scans skipped that code, and on main an inline test module in the middle of panels.rs hid the code after it. Both now drop only the body of an inline test module.
The prefs audits in scorecard and prefs_usage count a read when the section and the field appear in the same file. Both now also treat a split module (`foo.rs` with `foo/`) as one file, and prefs_usage leaves out `engine/src/prefs/` as scorecard already does, since that directory now holds the rest of the prefs model.
On main and on this branch: the i18n coverage report is identical (2,142 source keys; the old scan found 2,049 on main), `cargo xtask scorecard --check` is up to date, and prefs_usage passes.
The spooling tests rerun themselves in a child process with an exact test-name filter. print_cmds moved under cmd/, so the filters name cmd::print_cmds::tests::…; with the old names the child ran no tests.