An Anti-aliased Satin with the Gaussian or Ring contour takes both of its
shifted copies from the shape a third of a pixel towards the top-left
(satin_aa_shift), the offset the Inner and Drop Shadow measured: the whole
pattern moves up, its Distance stays. Linear, unmeasured contours and
Sizes whose blur is the identity keep today's map bit-for-bit. The GPU
satin builder takes the same offset on the same gate.
The Drop Shadow now takes the same third-of-a-pixel source offset the
Inner Shadow takes since #14934, through the same aa_shift gate (Gaussian
contour, no dilating Spread, a blur wider than the identity), on the CPU
(shadow_map) and the GPU map program (B::shadow). On the issue's document
the edges land within 2 levels of the measured profiles; the flag off
keeps every map bit-for-bit.
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.
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
The grey-profile conversion was keyed by the document's pixel-format colour
mode, so it reached more than the 8- and 16-bit Grayscale documents the
issue measured:
- 32-bit Grayscale documents;
- Duotone and Bitmap documents (their pixel format is Grayscale);
- Grayscale documents tagged with another grey profile (the transform
always targets sGray);
- Image > Mode > Bitmap's Custom Pattern thresholds, which ask for the
pattern in ColorMode::Grayscale.
The issue lists the first three as not measured, to keep their behaviour.
The conversion is now keyed by compose::pattern::PatternSpace.
PatternSpace::of(doc) is ProfileGray only for an 8- or 16-bit Grayscale
document in the default grey working space (untagged, or tagged with the
default grey profile, as swatch_in_doc asks of the document); every other
document, and every caller that names a colour mode, gets Mode(mode), the
pixel-format conversion main has. Edit > Fill and the Paint Bucket build
their tile in PatternSpace::of_pixels(doc), so they keep painting what a
pattern fill layer paints. The GPU compositor's pattern cache is keyed by
the same space.
PSD and layered-TIFF export render a pattern fill layer's stored pixels in
that space too (render_fill_content_in). They were rendered from the
pattern's own colours and converted by the pixel format, so a Grayscale
document's pattern fill layer reopened with the luma greys:
pattern_fill_survives_psd_and_layered_tiff_in_every_mode failed with
"Grayscale/U8 x.psd: the reopened pattern fill differs by 0.028272122".
The two engine tests this branch added started from a core Session::new(),
which installs no commands: they failed with NotInstalled when run alone,
as nextest runs them. They start from crate::session().
* build: move craft-develop to craft-libs main b2d2a1e9 (craft-libs#3101)
craft-develop and craft-develop-model move from 33be356 to b2d2a1e9,
which includes craft-libs#3101 (Detail's resolved parameters) and four
sensor commits (white-balanced demosaic with a clip mask; existing
signatures unchanged). Cargo.lock changes only craft-libs git sources.
per_pixel() no longer refuses Detail: it returns the stages with
`detail` set. RAW Develop's GPU pass has no Detail stage yet (#6916), so
the dialog now goes through gpu_stages(), which keeps a sharpened or
noise-reduced frame on the CPU. A device-free test covers it on hosted
CI; the GPU test adds Detail-only cases; the gpu crate's test follows
the new per_pixel contract.
* style(camera-raw): rustfmt gpu_stages' signature
---------
Co-authored-by: fjamesprice <[email protected]>
Keeps both test modules in crates/format/tests/it/main.rs: main's camera_raw_roundtrip and this PR's channel_mixer_cmyk.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* 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
The artcraft k8s main runners fail every_compositor_pipeline_builds with a
GLES adapter-context deadlock, mcp_wait with a 6000x6000 Gaussian Blur that
runs out of working memory, and occasionally hostile_modules_fail_quickly
when memory.grow is slow. Hosted ubuntu-24.04 and Windows stay green, and
the same tests have both passed and failed on k8s without a product-code
change. Serialize GL pipeline builds and the mcp_wait filters, and give the
hostile-module wall-clock bound more room.
`pipelines::every_compositor_pipeline_builds` builds every pipeline with
FXC on DX12, then again on every backend with `Dx12Compiler::Auto`.
Without `dxcompiler.dll` on the search path, as on the Windows runners,
`Auto` falls back to FXC, so the second DX12 pass repeated the first.
The second pass now names DXC, so DX12 drops out of it when DXC does not
load and is built through DXC when it does. The Windows adapter and
device checks stay on the FXC pass.
8 and 16 bits both develop with `float = false`, so they share every
line of the CPU develop and the pass; cases alternate between them so
both quantizations still run. Tiny frames run one depth per size, flat
frames and the dehaze tower (not quantized) drop the identical 16-bit
run, the dehaze cache test runs on an 858-wide strip (the cache key
doesn't hold the size), and the shadows-only 858-wide strip is left to
the clarity test's strip, whose case has Shadows and Highlights too.
The 300 x 260 trim put the far mask patch at (230,190,300,260), which touches
all four tiles of the mask's 2 x 2 resident span: no tile stayed absent, so the
branch #2422 is about (cells.rs: a missing tile in a new resident texture gets
the mask default pixel) was unreachable and the check passed with that line
neutered. The far patch now starts on the 256 px boundary, (256,256,300,260),
so tiles (1,0) and (0,1) stay absent; with cells.rs:431 neutered the test fails
again at this geometry ("mask default 1: max diff 246.16/255 at (282,208)",
inside the absent tile column). The document stays 300 x 260.
Comment truths: the disjoint-damages note called the second stroke series'
rectangles "all new" - they are new damage rectangles, not new cached pixels
(the chunk they land in is already resident), which is what whole-chunk
admission is about; the incremental-updates note called the painted area "one
256 px tile" in a document that spans a 2 x 2 tile grid.
The 77 GPU parity tests render the CPU reference and both compositors per
check; several tests then rendered the same document again for a ramp or a
Stats field, and several documents were far larger than the branches they
drive. `diff_rect_full` keeps one pass's pixels and stats so no test renders
a document it just compared a second time; the oversized documents shrink to
the smallest size that still crosses the 256 px tiles and pages they are
about, and the gated Inner Shadow rows compare over the shape instead of the
whole 400 x 300 canvas.
No branch is dropped: every assertion, tolerance and check count stays, the
big-document tests keep their measured documents, and the issue's two
mutation checks plus a tile-share mutation still fail against this harness.
Resolve the conflict in crates/engine/src/adjust_params.rs: keep this
branch's generic mixer_row (RGB rows of 4, ink rows of 5) and main's
rounding to whole percentages before clamping (#14414).
Co-Authored-By: Claude Opus 5.5 <[email protected]>