Commit Graph
114 Commits
Author SHA1 Message Date
yoriswind 3f09579dcd Merge upstream main to resolve PR #6601 documentation conflicts 2026-11-18 02:41:17 -08:00
BFlat 9e811a7d05 Merge pull request #8422 from dotCooCoo/fix/path-freehand-connect-needs-extend
Pencil: path.freehand refuses connect without extend
2026-11-18 13:11:10 +07:00
BFlat 18f8c57a5a Merge pull request #8037 from dotCooCoo/fix/erase-segments-width-bound
Path Eraser: path.eraseSegments refuses a width outside 0.001 to 1000 pt
2026-11-18 10:21:33 +07:00
BFlat 3a9bb87022 Merge pull request #7925 from dotCooCoo/feat/brush-options-of-selected-object
Brushes: Options of Selected Object changes one brushed path's brush settings without changing the brush
2026-11-18 10:18:41 +07:00
dotCooCoo 6252d4b29e Pencil: path.freehand refuses connect without extend
path.freehand ignored a connect given without extend and drew a new
path. It now refuses it with "connect needs extend". A connect given
with extend is checked (its id, a path other than the one extended
with an open end, and an end of "start" or "end") before a stroke of
one point returns, so a bad connect is refused there too, and
brush.freehand no longer changes the path's brush or the selection
before refusing it. A null connect is still a key left out.

Docs: params text, docs/mcp.md, docs/target-app-parity.md. i18n: the
new message in the catalogs that carry the other connect messages.
2026-11-17 11:56:49 -08:00
yoriswind 5f0e011379 Preserve open outlines painted by ancestor strokes 2026-11-17 07:48:02 -08:00
yoriswind 1904657eb5 Merge main and preserve independent Eraser progress notes 2026-11-17 04:07:48 -08:00
dotCooCoo aac6250a07 Merge main into fix/blob-params-rejected 2026-11-16 12:01:23 -08:00
yoriswind 0774371250 #6582: preserve straight fill closure during erasure 2026-11-16 10:57:58 -08:00
yoriswind ffa507e293 M2: reconcile Eraser imports with current Scissors changes (#6582) 2026-11-16 09:44:37 -08:00
dotCooCoo a10c403df6 Scissors: paths a cut makes have every stroke aligned Center
path.split (Scissors) and path.cutAtAnchors (Cut Path at Selected
Anchor Points) keep the source path's fill and stroke settings on the
paths they make, and now set every stroke's alignment to Center in the
same undo step, as the help page describes:
https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/modify-paths/split-paths.html

Every stroke row is reset, hidden ones included. A path of several
subpaths has one appearance, so its other subpaths' strokes are
centered too, and a cut member of a compound path centers the compound
path's strokes. An appearance whose strokes are already centered is
left shared. Knife, the erasers and Divide are unchanged.
2026-11-16 03:46:53 -08:00
yoriswind 573a924d19 M2: preserve evaluated ancestor gradients while erasing 2026-11-15 23:07:02 -08:00
dotCooCoo ea5ab86429 Path Eraser: path.eraseSegments refuses a width outside 0.001 to 1000 pt
path.eraseSegments checked only that `width` was a positive number, so a
width such as 1e300 erased every selected path and a width such as 1e-300
sampled the path too coarsely to find the band. It now refuses a width
outside 0.001 to 1000 pt with "`width` must be from 0.001 to 1000" before
reading the document; nothing changes and no undo step is recorded. Left
out or null, the width is still 8 pt. The range is VectorCraft's own: it
holds every width the Path Eraser tool sends across the view zoom and UI
Scaling limits, and its top matches the Eraser's largest Size.
2026-11-15 21:35:25 -08:00
yoriswind 3d5cce66e1 M2: reconcile gradient-preserving Eraser fix with main (#6582) 2026-11-15 21:22:58 -08:00
yoriswind 1012d7d2b5 M2: preserve gradient placement while erasing 2026-11-15 21:09:45 -08:00
dotCooCoo fcc8bd2c83 Merge main into fix/blob-params-rejected 2026-11-15 20:51:54 -08:00
yoriswind 14972b7667 M2: keep erased contours in their clipping mask 2026-11-15 19:49:07 -08:00
yoriswind 2315dc39d5 M2: reconcile open-fill Eraser with current main (#6582) 2026-11-15 18:43:14 -08:00
dotCooCoo b697ecbf07 Merge main into fix/erase-region-params-refused 2026-11-15 18:40:58 -08:00
dotCooCoo 8d50d3f911 Merge main into fix/blob-params-rejected 2026-11-15 18:36:57 -08:00
yoriswind 9db12a27f2 M2: preserve open fills with rectangular erasing 2026-11-15 18:30:22 -08:00
dotCooCoo fd7bdee746 Merge main into feat/brush-options-of-selected-object 2026-11-15 16:35:36 -08:00
dotCooCoo 418ae818e5 Merge main into fix/erase-region-params-refused 2026-11-15 16:06:28 -08:00
dotCooCoo 46e5ab21e0 Merge main into fix/pen-input-params-pressure-tilt-rotation 2026-11-15 16:06:17 -08:00
BFlat 6a3c9cfc8b Merge pull request #7957 from dotCooCoo/feat/eraser-alt-drag-marquee
Eraser: an Alt-drag erases everything inside a marquee, a square with Shift
2026-11-16 06:55:17 +07:00
dotCooCoo deaff22280 Merge main into fix/erase-region-params-refused 2026-11-15 13:42:46 -08:00
BFlat 8920f24351 Merge pull request #7920 from dotCooCoo/fix/smooth-corners-dense-paths
Smooth tool: keep corners on a path cut into very many short segments
2026-11-16 04:30:41 +07:00
dotCooCoo 6c74a77a6d Eraser: an Alt-drag erases everything inside a marquee, a square with Shift
With Alt held at the press, an Eraser drag draws a marquee from the press
point to the pointer instead of a stroke, and the release erases everything
inside it. Alt+Shift keeps the marquee square on its larger side, Escape
cancels it, and a click or a drag along one axis erases nothing.

path.eraseRegion takes {rect: [x, y, width, height]} in place of points.
Closed paths lose the rectangle's area; open paths are cut where they cross
its edges, found from the exact crossings, so a narrow rectangle across a
long segment still cuts it. A width or height of 0 or less, a non-finite
value, or points and rect together is an error, and nothing erased adds no
undo step.

Docs: docs/mcp.md, docs/ui-parity.md.
2026-11-15 12:13:13 -08:00
yoriswind 63dc751bca M2: reconcile fill-only Eraser fix with main (#6582) 2026-11-15 11:46:32 -08:00
dotCooCoo 74370b1cdb Brushes: a Paintbrush stroke that changes a path's brush clears the path's own brush settings
Extending a path with brush.freehand and another brush set the new brush
but kept the settings Options of Selected Object stored for the old one.
They are now cleared, as brush.apply clears them.
2026-11-15 10:49:11 -08:00
dotCooCoo 2f432926b2 Smooth tool: keep corners on a path cut into very many short segments
The Smooth tool measured the turn around each corner by walking at most
256 segments from the anchor, and did not keep an anchor as a corner
when twice the reach lay farther than that. A corner of a path cut into
short segments was rounded off: an open path with 0.05 pt segments at
the default 12 pt reach, or a square in 0.25 pt segments with a 40 pt
reach.

The walk now has no segment limit. Each segment's length is measured
once per path, and the lengths are added up in blocks of 2, 4, 8 and
more segments, so finding the point a reach away skips whole blocks and
measures only the segment it lands in. Each block adds up only its own
segments, so short segments keep their lengths next to very long ones.
2026-11-15 10:41:11 -08:00
dotCooCoo bb6a8076f3 Brushes: a one-point brush.freehand continuation follows keepSelected
A brush.freehand call that continued a path by one point changed the
path's brush and left the selection as it was. With keepSelected off the
path stayed selected, and with it on the path was not selected, unlike a
longer continuation and unlike what path.freehand's params text says.
The brush edit now selects the path, or deselects it while the rest of
the selection stays, as a longer continuation does. A call that leaves
the brush as it is still changes nothing.
2026-11-15 06:55:16 -08:00
dotCooCoo 0b34f7b5c0 Merge main into fix/blob-params-rejected 2026-11-15 06:08:47 -08:00
dotCooCoo 495513f0b6 Pen input: out-of-range pressure, tilt, rotation and size values are refused
The drawing commands that read pen values at their points (path.freehand,
brush.freehand, path.knife, path.eraseRegion, path.eraseSegments,
path.smoothRegion, path.joinScrub and path.blob) now refuse a pressure
outside 0 to 1, a tiltX or tiltY outside -90 to 90 and a rotation outside
0 to 360, naming the key. A tilt was kept within range and a pressure or
rotation was passed on. A point array of more than six numbers is refused,
naming the point, instead of having its extra entries ignored.

path.blob and path.eraseRegion refuse a size outside 0.1 to 1000 pt, the
range of the Blob Brush and Eraser tool options. path.blob refuses a
sizeVariation outside 0 to 1000 pt in every sizeMode and with the mode left
out. path.eraseRegion refuses a sizeVariation over 1000 pt in every mode
with the same message, and a negative one still gives "sizeVariation must
be 0 or more". Each refusal leaves the document, the selection and the
undo history unchanged; null and omitted values still take the defaults.

The tip variation test uses a 1000 pt tip and a 1000 pt Fixed variation,
the largest values path.eraseRegion now takes.

Docs: params text, docs/mcp.md, docs/target-app-parity.md.
2026-11-15 03:28:25 -08:00
BFlat 8138a6e973 Merge pull request #7814 from dotCooCoo/feat/editing-one-anchor-copies-the-whole-anchor-list
Paths: editing one anchor of a long path keeps one chunk of anchors for undo
2026-11-15 17:31:01 +07:00
yoriswind 05c7c167fe M2: reconcile PR #6601 with current main 2026-11-15 02:22:13 -08:00
dotCooCoo 7104cd05f3 Merge main into feat/editing-one-anchor-copies-the-whole-anchor-list 2026-11-14 22:05:53 -08:00
yoriswind 5bddcd83eb M2: preserve fill-only erasure with varying tips 2026-11-14 21:46:29 -08:00
dotCooCoo a5493a1cd0 Paths: editing one anchor of a long path keeps one chunk of anchors for undo
A subpath's anchors are now an `Anchors` list held in chunks of up to
256 anchors behind `Arc`s. Copying a path copies the chunk table and
shares the chunks, and editing one anchor copies only the chunk that
holds it, so the undo step of a one-anchor edit no longer keeps a copy
of every anchor of the path. Inserting or removing an anchor copies the
chunk it is in and rebuilds the table. Reads and edits follow the Vec
and slice methods the code used; files write and read each subpath's
anchors as one list, as before, within the same anchor read budget.

The undo memory estimate counts only the chunks the other version of
the path does not hold, and the renderer's kept paths compare only the
chunks an edit copied when they look for moved anchors.

Moving one anchor of an open path of 10,000 or 200,000 anchors
(path.moveAnchor, path.setHandle, path.moveAnchors, a nudge) keeps at
most 48 KiB in its undo and redo steps, where it kept 56 bytes per
anchor.
2026-11-14 21:25:15 -08:00
dotCooCoo 8c4516aa87 Merge main into fix/one-undo-step-a-refused-brush-on-a-path-with-no 2026-11-14 21:02:12 -08:00
dotCooCoo 4a0332e30f Merge main into fix/erase-region-params-refused 2026-11-14 20:42:40 -08:00
dotCooCoo ba9acf808e Brushes: brush.freehand is one undo step and refuses strokeless paths and unknown keys
brush.freehand drew the path with one edit and set the brush with a
second, so one Undo left the path without its brush. The brush is now
set in the same edit that draws, continues or redraws the path, and the
step is named Paintbrush whatever the style.

A brush for a path with no stroke (a continued or redrawn path without
one, or a new filled "pencil" path while the stroke is None) was skipped
and the call still succeeded. It is now refused with "cannot apply brush
`<name>`: path has no stroke" before anything changes. The Paintbrush
tool sends brush.freehand when a brush is current, so continuing or
redrawing such a path with it now shows this error. This rule is
VectorCraft's own.

brush.freehand is no longer in UNCHECKED: it takes the path.freehand
keys and `brush`, and any other key is refused with "unknown parameter".
2026-11-14 17:31:16 -08:00
dotCooCoo 6c585de940 Eraser: Angle, Roundness and Size vary with Random, Pressure, Tilt, Bearing or Rotation
Eraser Tool Options gives Angle, Roundness and Size each a variation menu
(Fixed, Random, Pressure, Tilt, Bearing, Rotation) and a Variation field.
path.eraseRegion takes angleMode, roundnessMode and sizeMode with their
variations, sweeps a varying tip as a Calligraphic nib with what the pen
read along the drag, and refuses an unknown mode or a variation out of
range. The Eraser records the pen's pressure, tilt and rotation when a
mode follows them, and its tip outline at the pointer takes the angle,
roundness and size the pen gives while it erases.
2026-11-14 17:08:14 -08:00
dotCooCoo de515d4f73 Merge main into fix/erase-region-params-refused 2026-11-14 13:46:21 -08:00
dotCooCoo f39ee6ae23 Merge main into fix/blob-params-rejected 2026-11-14 13:42:15 -08:00
dotCooCoo 3674865d62 Merge main into feat/smooth-keeps-corners 2026-11-14 09:42:14 -08:00
dotCooCoo 884c27909b Merge main into fix/blob-params-rejected 2026-11-14 09:39:19 -08:00
BFlat d89f593bfa Merge pull request #7380 from ncic/pencil-cursors
Pencil: shows where a stroke continues, connects and closes
2026-11-15 00:38:01 +07:00
dotCooCoo da8f6ab721 Smooth tool: a whole closed path with a corner starts nearest its old start
When a drag reaches every anchor of a closed path that has a corner, the
path is cut open at the corner and refitted. The result started at the
corner unless the refit kept an anchor exactly at the old first anchor.
It now starts at its point nearest the old first anchor, at an anchor
there or at a new anchor split into the curve, as the other closed-path
cases do.
2026-11-14 08:31:41 -08:00
dotCooCoo a0a363cfca Merge main into fix/blob-params-rejected 2026-11-14 07:26:52 -08:00