Engine split step 8 moved Auto-Align Layers to engine-vector, so the
playback and Undo test in engine-core built a session where
`edit.autoAlignLayers` isn't registered, and no longer exercised the
real command. It moves to the engine integration tests
(`atn_auto_align_play.rs`), where `Session::new()` installs every crate's
commands, and now also checks that playing the step adds one history
state. The import and export tests stay in engine-core.
- A duplicated action set goes right after its source on next.
- The Mixer test clicks inside the first green pixel: a click right on the edge maps back a hair short of it.
- Tests install NoWindows: on Windows SystemWindows tells the real mouse, which next's OS file drops follow, so the
tab-drop test read wherever the runner's cursor was.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Auto-Blend collected only the selected pixel layers, so with a type layer or a smart object in
the selection it blended the pixel layers and ignored the rest. The reference application
refuses: the command is not available and no history state is added.
Gives Auto-Blend its own enabled check (a type layer or smart object among the selected layers
makes it unavailable) and the same guard at the start of the run. Auto-Align keeps its check.
With Align Edges on by default the stroked layer renders on 20..81 and
View > Snap To pulls the y = 80 press onto that edge; the test now makes the
layer without Align Edges.
Co-Authored-By: superplay2021 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The PR snapped shapes with a per-edge heuristic (pixel_align.rs, dash-cap tie
rules, a PSD coordinate-frame field threaded through engine, format and caches),
defaulted the option to off, and renamed the existing Rectangle/Triangle
"Align Edges" checkbox to "Snap Bounding Box" next to a second checkbox.
The reference application fits the whole shape at render time: the bounds of
what it paints (fill, or the stroke's outer edge) get a whole-pixel left/top
(a half rounds up) and a whole width/height, and the path is translated and
scaled into that box. Fill and stroke take one transform; curves stay
antialiased; inner edges of several subpaths are not snapped.
- photocraft_vector::align_edges implements that rule; CompiledShape applies it,
so caches, the compositor, previews and extents agree; the fill/stroke split
under layer effects starts from the whole shape's transform.
- Removed pixel_align.rs, the rasterizer helpers it needed, the document-space
drag preview and psd_coordinate_frame (rounding the bounds absorbs the PSD
quantization it was for).
- One Align Edges checkbox (ToolOptions::align_edges, stored and scripted as
useAlignedRendering, older align_edges still read) on every shape tool and the
Pen, on by default and after Reset Tool; it snaps the drag and sets the layer.
- PSD sn2P: written as 1 when on and left out when off, as the reference saves it.
- Dropped the dead path.set param, moved the control-protocol paragraph,
rewrote docs/pixel-aligned-strokes.md, reverted the unrelated raw, font,
Cargo and test-harness changes.
- Tests reproduce the measured cases (rectangles at .25/.4/.5/.6/.75, ellipse
extremes and curve symmetry, 1/2/3 px strokes, rotated rect, Pen triangle,
two subpaths, toggle off, stored path unchanged, one checkbox, Reset Tool).
Co-Authored-By: superplay2021 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Edit > Define Pattern composites the area in the document's pixel format, which stores an Indexed Color document expanded to RGB. Nothing on Pattern said where the tile came from, so a pattern taken from an Indexed image was indistinguishable from an RGB one, and a tool that cares about the difference had nothing to read.
The new field names the source mode. The pixels, the id and what the pattern library lists stay as they were. A pattern read from a file records no source: a .pat or PSD block says what its pixels are, not which document they came from. The library index and .pcraft carry the field, so a defined pattern keeps its source across a restart or a save; files written before it read as no source.
Step 8 of the engine split moves the vector commands into their own crate. The
tests in those files that read core's cfg(test) counters, or test core's own
smart-object caches, are changed first:
- smart_cmds::source_cache_statistics() counts SVG source renders and native
source bytes hashed per thread; it replaces the cfg(test) counters, and the
test-only memo limit override goes.
- The WarningRenderSources memo tests and the native digest test move to
core's smart_cmds source_work tests; the digest test sets up the source and
its verified preview through the document instead of running the vector
update, with the same assertions.
- The ignored 24 MP update timing test is removed: its memo-off pass needed a
test-only production setting.
- rasterize_style's tests fill their layer through a local helper instead of
core's test helper.
- The pattern placement checks for edit.fill and paint.bucket move to the
paint tests in tests/it, where those commands are installed.
scripts/engine_split/slot_access.py rewrites the slot fields to their accessors
(Tracked presets deref through one more *), adds the trait imports, turns
s.presets_changed() into presets::presets_changed(s) and points Session::method doc
links at the trait methods. Its fix mode applies what cargo check reports; branch
mode serves open branches and lists their edits to the moved methods. The
definition-span helpers session_state.py uses move to rust_source.py so both
scripts share them (session_state.py's output is unchanged).
This commit is split plus the fix rounds against cargo check of engine-core,
engine, ui-egui and automation (lib and tests). Part of #15710.
- slots.rs: SlotInit, Install::slot, Session::slot/slot_mut (a missing slot is the registry's error); the preset store is the first slot (preset_store::PresetStoreExt)
- state.rs: the small Session state types and what they need; their modules re-export them
- actions_record.rs: ActionRecording (s.recording) takes the recording and playback fields out of ActionState
- action_history::history_policy_in_use; Clip::from_svg becomes edit_cmds::clip_from_svg
- prefs/saved.rs: SavedPrefs, its readers and the methods that combine preferences, colour settings and presets; ScriptEvents and ShortcutSet move into prefs
- hooks: document_closing, doc_id_reserved, pixels_edited
- tests that compare a whole ActionState also compare s.recording
Keep the parameter-schema dispatch, including Clean Brush refusing
unknown keys and the batch test that does not pass steps to Image
Processor. Take main's engine-core split and its new session helper.
Smart filter re-rendering looks the filters up in the command registry, and
these corpus tests create no session, so they install first like the other
tests that read the registry before a session.
crates/engine keeps the package photocraft-engine: src/facade.rs re-exports
photocraft-engine-core, and its Session wraps core's and installs every engine
command. Core's Session::new() installs nothing; core gets install() and session().
The command registry keeps main's behaviour (empty before an install).
The top crate's dev-dependencies cover tests/ and examples/, including
craft-develop-model (camera raw baseline test) and photocraft-testkit (the
corpus-gated Photoshop oracle test). Dependents that need the core type or
borrowed two fields through the wrapper are fixed at the call site, and tests
that reach the registry before any session install first.
Tooling follows the package: workspace dependency, cl selection, xtask layers,
i18n report, scorecard and corpus paths, nextest overrides, ci-test-times rows,
display-names roots, prefs_usage paths, the engine split scripts, docs, and the
two release-perf steps in ci.yml.
Corpus .atn paths, the layer_menu registry read and the craft-develop-model
dev-dependency are FredApps' fixes from #16431.
Part of #15710
Session::precheck skipped the file.new value check that dispatch runs, so a
bad file.new passed precheck and failed only at dispatch. Both now call one
function, in dispatch's existing order.
Local Adaptation compressed the blurred log luminance toward its mean and
never stretched the result, so an 8-bit image came out darker (white at
166). It now compresses toward the brightest base, which becomes white,
with 1 / (1 + 3 * strength) fitted to the reference samples, and the detail
is compressed with the base so a darker tone never comes out brighter at a
large radius or strength. The checked replay follows the same lines.
The #710 Gamma test toned a flat grey document, which now turns white at
every Gamma; it gets a white half so the grey stays a midtone.
* raw,camera_raw: bump craft-develop to 7631ed550 and add explicit parity tests (#587)
* raw,camera_raw: cut over develop_sensor demosaic and camera_raw::develop to craft_develop (#587)
* raw,camera_raw: fix craft_develop field names and test imports (#587)
* camera_raw: fix clippy excessive_precision and unnecessary cast lints
* raw,camera_raw: use exact gaussian_taps for sharpening, silence camera_raw_gpu dead_code, update post-cutover pins
* raw,camera_raw: fix highlights sign, <0.3px sharpen noop, non-Bayer/fused parity, and gpu test ignores
* engine: update camera_raw_filter_legacy_baseline_pixels to post-cutover craft_develop baseline
* raw,camera_raw: early-exit noop sharpen, exact full desat, PAD=6 fused margin
* raw,camera_raw: guard <0.3px texture/clarity blur and route fused band demosaic through craft_develop
* io: update default RAW Open baseline pins for craft_develop::sensor::demosaic reflect borders
* io: add Windows libm FNV-1a hash pins for RAW Open baselines
Keep main's command registry split, and carry the parameter-schema docs
and composed-layer option placement from this branch into the new table
modules.
Normalize and deduplicate saved point-curve knots in the original f32 domain before using the shared spline. Regression tests pin the LUT and a generated native Smart Filter after save/reopen.
- cargo fmt for the merged Tool list in paint_mouse.rs.
- The #11516 fix refused an exported Image Size step with "percent": null,
which main's review test treats as omitted. Native playback now omits a
null percent like a null side or resolution, and export follows it, so
both still agree. The null case moves from the invalid-percent test to a
new native + round-trip test.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test(raw): pin pre-cutover Camera Raw SmartFilter and filter baseline (#587)
* test(format): avoid json! macro recursion limit in camera_raw_roundtrip (#587)
* test(format): wrap SmartSource::Embedded bytes in Arc (#587)
* test(engine): use select.deselect in camera_raw_baseline_pin (#587)
* test(raw): capture legacy RAW Open and Camera Raw Filter pixel baselines (#587)
* test(raw): lock Camera Raw Filter baseline pixels and capture RAW Open values (#587)
* test(io): lock legacy RAW Open baseline pixels (#587)
* test(io): capture RAW Open camera WB legacy baseline pixels (#587)
* test(io): lock RAW Open camera WB legacy baseline pixels (#587)