550 Commits
Author SHA1 Message Date
David Mann b30a4b0bae Merge #16661 into the merge queue batch
Outer Glow: one Range/Size rule for Softer Edge glows (#15871)
2026-11-25 13:28:26 +01:00
David Mann ec236094ca Merge #16638 into the merge queue batch
fix(tools): a pattern from an Indexed image keeps painting (#13071)
2026-11-25 13:28:24 +01:00
David Mann 77b7358fbf Merge #16200 into the merge queue batch
Modern Brightness at +150 and -150 matches the reference ramps (#14348)
2026-11-25 13:28:21 +01:00
RickiNano b1100518a1 Modern Brightness: each input rises with the slider up to ±150 (#14348)
Past +110 the curve mixed the slider's own roll-off with the fixed +150
fit. The power roll-offs come closer to white than that fit past about
input 220, so the mix fell there as the slider neared +150: input 200
gave 253.55 at +134 and 253.32 at +150.

The ease now starts at +109.5, the last Hermite roll-off, which stays at
or below the +150 fit everywhere, and mixes from the roll-off held at or
below the fit. Both parts of the mix then rise with the slider, and the
curve reaches the +150 fit itself at +150, so the measured ramps are
unchanged.

The new test steps the slider one unit at a time from ±100 to ±150 and
checks every 8-bit input; it fails on the previous curve.
2026-11-25 07:06:51 +01:00
RickiNano bab63cc90e Outer Glow: read the floor from the box end taps (#15871)
softer_edge_floor needs only the box end tap and its neighbour, so it
no longer builds the whole tent kernel (quadratic in the Size).
2026-11-24 15:38:28 +01:00
RickiNano f9c6b8b05e Outer Glow: one Range/Size rule for Softer Edge glows (#15871)
The Range 1 % fix from #15311 hardened an outer Softer glow only at
Size 10 / Range 1 %. Other small Ranges and other Sizes still reached
one pixel too far (Range 2: 96, 223 for 125; Size 20 at Range 1:
48, 175, 239 for 93, 201).

An outer Softer Edge glow with Spread 0 and the Linear contour now maps
coverage v through (v - floor) / (levels * (1 - floor)): the Range
rounded to a whole 8-bit level, less the tent's outermost tap when the
blur's box ends in half taps (even Sizes). That gives every measured
pixel of #15871 and #14958 (Range 1, 2, 25, 50, 100 at Size 10; Range 1
at Sizes 5 and 20) within 1 level. The GPU reads the same table through
glow_paint_lut. Inner glows keep today's table.
2026-11-24 14:43:30 +01:00
f2ac09d2ec Fix-up for #11756: Align Edges as the reference application renders it
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]>
2026-11-24 13:02:42 +01:00
hnoerenberg 818a4a010d feat(doc): patterns record the colour mode they were defined from
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.
2026-11-24 11:22:16 +01:00
superplay2021 47790f5e0d Merge latest main and resolve Align Edges conflicts 2026-11-23 21:25:02 +02:00
David Mann aa21256f7f Address CodeRabbit review on the restored batch
- CMYK Channel Mixer in a 32-bit document: the change is added as the
  difference of two round trips through the inks, so samples past 0..1
  keep their magnitude and an identity mixer leaves HDR highlights alone.
- PSD: a Channel Mixer block in PhotoCraft's old RGB layout (fourth record
  repeating the first, no black source) in a CMYK document keeps its RGB
  reading instead of setting the black ink to the cyan mix.
- Color Settings dialog: a Monitor Profile set before the first pass
  loads Monitor Color's working RGB at once, and Reset set before the
  first pass shows Custom.
- Test: the non-identity CMYK mixer check runs in RGB documents too.
2026-11-23 15:17:08 +01:00
David Mann 42236a89fa Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	crates/engine-core/Cargo.toml
#	crates/ipp/Cargo.toml
#	crates/ui-egui/src/tools/analysis/tests.rs
2026-11-23 14:58:08 +01:00
David Mann 81cc69f17e Address CodeRabbit review; follow main's colour state accessors
- Curves at 8 bit: evaluate the channel and composite curves at the 256
  exact levels instead of between two entries of the 4096-entry table, so
  a pencil step between levels 128 and 129 no longer gives level 128 a
  fraction that rounds to level 4.
- Color Settings: a later Monitor Profile change keeps "Monitor Color"
  only while the values still are what Monitor Color would set.
- Color Settings dialog: a control changed by ui.dialog.set before the
  first pass shows Custom instead of becoming the baseline.
- Stored-channel edits (Lab/CMYK, CMYK Channel Mixer) mix through the
  selection as v*(1-k) + o*k, exact at full coverage over huge 32-bit
  values.
- Action playback: a Channel Mixer step the editor refuses reports the
  refusal instead of opening the generic step editor.
- Shortcut set test: assert Cancel closes the confirmation.
- Merge follow-up: Session's colour state is reached through
  ColorExt::color()/color_mut() on main now.
2026-11-23 13:31:11 +01:00
aiongg 3098631a38 Hue/Saturation range swatches and spectrum run the engine's adjustment on one colour 2026-11-23 06:06:58 +00:00
David MannandClaude Opus 5.5 877982cb0c fix(compose): CMYK split stand-ins keep ink Curves off whole levels
#14650 puts 8-bit RGB Curves output on whole levels. The CMYK split route
renders ink Curves as RGB stand-ins, so they were rounded too, while the
exact ink path is not: the two routes parted by one level
(cmyk::tests::the_split_route_agrees_with_the_exact_path). The stand-in
contexts now build unrounded Curves tables; RGB documents are unchanged.
The shrunk failing case is kept as a proptest regression seed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-23 02:22:09 +01:00
David Mann bd5515513f Merge #14650 into the merge queue batch
fix(compose): round the channel curve before the composite curve at 8 bit
2026-11-23 01:58:03 +01:00
David Mann 8d479ee9c2 Merge #15311 into the merge queue batch
fix(compose): Outer Glow Range 1 % follows the measured reach and hardness (#14958)
2026-11-23 01:58:02 +01:00
David Mann d321a2db62 Merge #15085 into the merge queue batch
fix(compose): Inner Shadow size 1 draws the measured pixel
2026-11-23 01:58:00 +01:00
Higgs32584andClaude Opus 5.5 b0e95488da Merge upstream main into fix/8047-channel-mixer-cmyk
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]>
2026-11-22 12:56:48 -05:00
superplay2021 e1ba70a49b Merge latest main and fix Align Edges test compilation 2026-11-21 22:31:23 +02:00
RickiNano 3da8da9955 Modern Brightness at +150 and -150 matches the reference ramps (#14348)
Past +110 the raised Brightness curve now eases into a curve fit to the
reference application's 8-bit +150 ramp: a line of slope 2.585, a cubic
Hermite bridge, and an exponential approach to white that is still
rising at white. The power roll-off it replaces reached white too early
(254.5 at input 200 where the reference has 253), so the lowered curve,
its inverse, stopped at 254 -> 191 instead of 214.

The measured -150 table is the inverse of the +150 one once the rounding
plateaus are read at their middle, so lowering stays the inverse of
raising. Both ramps now match within a level, and settings up to +/-110
are unchanged.

Fixes #14348
2026-11-21 16:34:02 +01:00
hnoerenberg 1e30578f0d Merge upstream/main into fix/curves-composite-rounding-14446
# Conflicts:
#	crates/compose/src/adjust.rs
2026-11-21 16:28:00 +01:00
Mex ba53b47048 Use the standard divisibility check in the bevel fixture 2026-11-21 10:54:15 +01:00
Mex f0a1b7c9c3 Tests: cut duplicate bevel thread cases (#15935) 2026-11-21 10:39:20 +01:00
Higgs32584andClaude Opus 5.5 3356714009 Merge upstream main into fix/8047-channel-mixer-cmyk
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]>
2026-11-20 18:57:10 -05:00
superplay2021 00d838bd66 Merge latest main and resolve Align Edges conflicts 2026-11-20 20:11:10 +02:00
hnoerenberg bfe30f7eb9 test(compose): keep main's Size 1 review test honest about this branch's fix
#14934's review test asserted the Size 1 inner shadow map stays empty and that
Anti-aliased does not move it. #14933 changes the first half of that: Size 1 now
gets the 1/4-1/2-1/4 taps, so the first pixel inside every edge darkens. The gate
#14934 added still holds - aa_shift excludes a width-1 blur - so the map must stay
identical with the flag on and off, and darkening must stay symmetric on all four
edges instead of the one-sided line an ungated offset would paint.
2026-11-20 18:36:14 +01:00
hnoerenberg a8f4d243be Merge upstream/main into fix/inner-shadow-size-one-14933
# Conflicts:
#	crates/compose/src/effects.rs
#	crates/gpu/src/fx/builders.rs
#	crates/gpu/src/fx/tests.rs
2026-11-20 18:26:55 +01:00
hnoerenberg e395331e0e Merge upstream/main into fix/outer-glow-range-one-14958
Conflict: crates/compose/src/effects.rs test-module list only (kept both sides: outer_glow_range_one_tests plus main's satin_invert_contour_tests). crates/compose/src/effects/paint.rs merged cleanly: main changed noise() and glow_map(), this branch's Range-1 exception sits in glow_lut(), no overlap.
2026-11-20 16:21:55 +01:00
David Mann 59147c730c Merge #15112 into the merge queue batch
fix(compose): honour Anti-aliased for the Inner Shadow map
2026-11-20 15:52:16 +01:00
David Mann 1a97ade598 Merge #15735 into the merge queue batch
fix(compose): draw a one-pixel Size 1 Inner Glow
2026-11-20 14:16:36 +01:00
David Mann 95af987938 Merge #15013 into the merge queue batch
Gradient Map: keep the gradient's lightness in Grayscale documents (#14698)
2026-11-20 14:16:34 +01:00
hnoerenberg 8b1af24cb8 Merge upstream/main into fix/inner-shadow-antialiased-14934 2026-11-20 14:14:18 +01:00
hnoerenberg 900e9bbd02 Merge upstream/main into fix/inner-shadow-size-one-14933
# Conflicts:
#	crates/compose/src/effects.rs
2026-11-20 10:37:46 +01:00
hnoerenberg 2a5c4041b4 Merge upstream/main into fix/curves-composite-rounding-14446 2026-11-20 09:16:26 +01:00
superplay2021 31de878f08 Merge latest main and resolve Align Edges conflicts 2026-11-20 04:44:04 +02:00
David Mann bb4dc343b3 Merge #15420 into the merge queue batch
fix(compose): fade split Blend If points over both ends in 8-bit documents (#14855)
2026-11-20 02:04:37 +01:00
David Mann 968d74adee Merge #15282 into the merge queue batch
Layer Style: Satin's Invert flips the result after the contour (#14981)
2026-11-20 02:04:36 +01:00
David Mann 210de55b1a Merge #15197 into the merge queue batch
fix(compose): scatter Outer Glow noise at the measured strength

# Conflicts:
#	crates/compose/src/effects.rs
2026-11-19 22:27:52 +01:00
David Mann 79cb23b131 Merge #15188 into the merge queue batch
fix(compose): scatter effect noise at the measured strength (inner shadow)
2026-11-19 22:27:51 +01:00
Higgs32584andClaude Opus 5.5 e92804520d Merge upstream main into fix/8047-channel-mixer-cmyk
main moved the command table out of crates/engine/src/cmd.rs into crates/engine/src/cmd/table/. cmd.rs takes main's version; this PR's Channel Mixer params doc (cyan/magenta/yellow/black ink outputs, monochrome unsupported for CMYK outputs) now lives on the channelMixer entry in cmd/table/image/adjustments.rs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-19 15:53:45 -05:00
David Mann 3674da4f9d Merge pull request #10537 from admiralronton/fix/bevel-gloss-high-altitude
Bevel gloss contour: split at the unmapped sin(altitude) (#594)
2026-11-19 18:58:15 +01:00
Michael Higgins 9888613806 Merge branch 'storytold:main' into fix/8047-channel-mixer-cmyk 2026-11-19 10:19:01 -05:00
hnoerenberg 505dcd7881 Merge upstream/main into fix/outer-glow-range-one-14958 2026-11-19 14:45:10 +01:00
hnoerenberg e0d86d4a8b Merge upstream/main into fix/outer-glow-noise-14952 2026-11-19 14:14:02 +01:00
hnoerenberg 67a003d706 Merge upstream/main into fix/inner-glow-noise-14936 2026-11-19 14:13:58 +01:00
hnoerenberg 3a06f56045 Merge upstream/main into fix/inner-shadow-antialiased-14934 2026-11-19 14:13:40 +01:00
hnoerenberg 34d7402244 Merge upstream/main into fix/inner-shadow-size-one-14933 2026-11-19 14:13:32 +01:00
hnoerenberg be11539592 Merge upstream/main into fix/curves-composite-rounding-14446 2026-11-19 13:42:22 +01:00
aiongg a8f95bd16d Document layer index and index-ordered selection (#15704)
Document.layers is a LayerTree that builds an id index on first lookup and drops it on any mutable access. Layer lookups and selected_layers use the index instead of walking the document.
2026-11-19 10:07:19 +00:00
haranishi 378c31c92b fix(compose): render Size 1 Softer Inner Glow at edges 2026-11-19 18:38:36 +09:00