Commit Graph
17 Commits
Author SHA1 Message Date
Adam 55bfb7033e feat: show six Distribute Objects buttons in Control bar when 2+ objects selected (Illustrator parity)
Squashed from #4561 onto main.
2026-10-30 19:50:23 +07:00
Adam 565235b54b Merge remote-tracking branch 'origin/main' into feat/width-smooth-profile
# Conflicts:
#	crates/doc/src/appearance.rs
#	crates/render/src/lib.rs
#	crates/ui-egui/src/dialogs/width_point.rs
2026-10-27 10:01:09 +01:00
Adam 361cb43c4f #3145: fit width-profile outlines to cut export size 2026-10-23 10:54:09 +02:00
Adam 8efeeaf279 Merge remote-tracking branch 'origin/main' into feat/width-smooth-profile
# Conflicts:
#	crates/tools/src/builder.rs
#	docs/target-app-parity.md
2026-10-23 01:09:11 +02:00
Adam 5759fd3d69 Width profiles: sample outlines adaptively 2026-10-23 01:06:43 +02:00
Adam 360f591f37 Tools: satisfy clippy's simplified boolean check 2026-10-22 21:38:04 +02:00
Adam 03d5c0c991 Merge remote-tracking branch 'origin/main' into feat/width-smooth-profile
# Conflicts:
#	crates/effects/src/stroke/gradient.rs
2026-10-22 21:34:29 +02:00
Adam 478b3db262 M3.64: width profiles end with one-sided PCHIP slopes 2026-10-22 21:31:05 +02:00
Adam b4a5978490 Merge remote-tracking branch 'origin/main' into feat/width-smooth-profile
# Conflicts:
#	crates/engine/src/cmd/patterncmds.rs
#	docs/target-app-parity.md
2026-10-22 14:04:03 +02:00
Adam c6c359fb76 effects: keep width samples on their flattened branch 2026-10-21 05:19:36 +02:00
Adam 28d0eba3d8 Patterns: satisfy clippy's simplified boolean check
The pre-existing swatch name-clash test is a negated conjunction that clippy 1.95 flags as nonminimal_bool, which stopped cargo xtask ci before this PR's crates were checked. Rewrite it as the equivalent disjunction; no behaviour change.
2026-10-21 03:27:43 +02:00
Adam 2c363d6b88 effects: offset profile samples along the source tangent
Profile samples added inside a flattened chord used the chord's direction for their normal, so a zoomed outline jogged at every flatten vertex. Keep the source segment that drew each flattened piece and ask it for the exact tangent at added samples; fit runs with coordinate-wise Fritsch-Carlson tangents. Adds a regression test and records the change in the parity evidence.
2026-10-21 03:24:01 +02:00
Adam 67933d404f effects: keep a wide constant stroke over its centre
When a constant profile's half-width reaches the local radius of curvature, the smooth inner offset crosses the centre and the non-zero fill leaves a hole. Cut through the centre at those samples; the cut is inside the painted stroke. Varying profiles keep the offset because their crossings can be real caustics, where a cut would show as a slit. Regression test: a radius-5 circle with a 30 pt stroke contains its centre.
2026-10-20 10:55:33 +02:00
Adam 11e33a85b8 effects: keep width-profile outlines smooth on curves
Offset smooth points along the curve's normal instead of the flattened polyline's miter (w/cos), which spiked the edge at every sample on tight curves. Fit runs with chord-length Catmull-Rom tangents so a short sample cannot flatten the long segment beside it, and add a coarse wide-circle regression test.
2026-10-20 10:02:38 +02:00
Adam e4982c26da M3.64: cache profile hit-test lengths and correct width locality 2026-10-20 10:02:38 +02:00
Adam 04dbee48db M3.64: width outlines stay smooth where their width changes fast 2026-10-20 10:02:37 +02:00
Adam bcbd31f3a4 M3.64: width profiles run smooth between their points
A width profile's sides now run as a cubic Hermite curve through the
points, its slope at each one the weighted harmonic mean of the secants
either side (Fritsch-Carlson). That is C1 continuous and monotone
between points, so it never overshoots them, a width change eases in and
out instead of making a corner, and moving one point only reshapes the
two segments beside it. The ends are flat; two points at one t are still
a step.

The outline samples the curve along the path (densify subdivides each
profile segment) so the smooth width draws on straight runs too, and a
flat profile keeps its old straight pieces.

Hit testing now counts every segment near enough to reach the point, as
the wider side of a farther one can paint past the nearest; gradient
strips reach over projecting dash caps. Tests updated for the new
sampled widths; new tests cover smoothing, monotonicity, locality and
steps.
2026-10-20 10:02:37 +02:00