Thumbnail Ctrl+click and Select Pixels are Load Selection (Selection
Change for a shape or a vector mask), Shift+click and the chain name
their direction, and a mask drop is one Add Layer Mask step. The menu
calls (no layer id, plain toggles) keep their names.
Settings saved before the checkbox (#14243) held one number, with 1 meaning off. Any number up to 1
loaded as the box off with 1.45, so a hand-edited 0.5 was silently replaced and not reported. Only
exactly 1 is the off sentinel now; a smaller number is reported as an invalid preference and loads
as 1.45 with the box on, as an out-of-range value in the new format does.
Blend Text Colors Using Gamma was a 1.0 to 2.2 slider where 1.0 meant off, so turning it off and on lost a custom value. ColorSettings now keeps the field's value (blend_text_gamma, 1.00 to 3.00, two decimals) and the box (blend_text_gamma_on) apart; text_gamma() is what the compositor blends in (1 while the box is off), and the compositor takes up to 3.00. edit.colorSettings still takes a bool for blendTextGamma (the box alone) or a number in range (the value, and the box checked), plus blendTextGammaOn. The dialog shows the checkbox with the field beside it: typing a value checks the box, focusing does not, an out-of-range value alerts "A number between 1.00 and 3.00 is required. Closest value inserted." and an emptied field puts its value back. Settings saved as one number still load: 1 as the box off with 1.45, any other value as the box on with that value (#14243).
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 PNG frame is flattened for its Alpha Channel choice before the export
pipeline's scratch check, which then saw only the matted copy: a failed
source read could be written as placeholder pixels. Guard the source
frame with Artboards to Files' ScratchGuard across the flatten.
The PNG check compared the literal "png", so ".png" (which the encoder
writes as PNG) skipped the option; resolve the format as io does.
- 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.
With Path Selection, Delete removes the selected components of a shape
layer, saved path or vector mask (path.deleteComponents), or the targeted
saved path when nothing is selected, instead of deleting the layer.
The Properties panel Fill and Stroke popovers now hold the screen pick and
feed the sampled colour back, as the options bar does.
Fixes#13269
Co-authored-by: Dan <[email protected]>
Main's engine split step 7 moved the paint modules to crates/engine-paint and
the pattern mode tests to the engine crate's tests/it:
- cmd/fill_cmds.rs was deleted from engine-core (git saw no rename): Edit >
Fill's pattern tile is built in PatternSpace::of_pixels(doc) in
crates/engine-paint/src/cmd/fill_cmds.rs.
- cmd/paint_cmds.rs followed its rename.
- pattern_mode_tests.rs is crates/engine/tests/it/paint_in_pattern_mode.rs:
the tests this branch added start from the facade's Session::new(), which
installs the commands, like the two that moved.
# Conflicts:
# crates/engine-core/src/cmd/fill_cmds.rs
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.
The engine split moved atn_cmds and batch_run to crates/engine-core, so
caf_action_values_tests.rs moves with them. Session's Actions state is now
behind ActionsExt, so the engine-core and ui-egui tests set the list
through actions_mut(). In batch_run the scratch session keeps main's
actions_mut()/recording setup and still copies the remembered Content-Aware
Fill workspace.
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.
crates/engine/src keeps only facade.rs on main; color_cmds.rs in engine-core
already includes the file at ../color_settings_presets_tests.rs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- 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
Merging main #16449 carried this PR's lib.rs module declaration into
engine-core (photocraft#15710), but the new source file stayed under
crates/engine/src, so the crate would not compile.