Commit Graph
941 Commits
Author SHA1 Message Date
BFlat 59771c6566 Merge pull request #8002 from dotCooCoo/fix/tool-overlays-long-drag-copies
Tool overlays: long drags keep their line in shared pieces instead of rebuilding it every frame
2026-11-16 10:35:26 +07:00
BFlat 6d6dd28fad Merge pull request #8018 from dotCooCoo/feat/ellipse-tangent-radius
Ellipse: a circle drawn from its center snaps its radius to touch a nearby path
2026-11-16 10:35:17 +07:00
BFlat 844f57a209 Merge pull request #7953 from dotCooCoo/feat/trim-hover-preview
Path Precision Tools: Trim at Crossings shows the stretch a click would remove
2026-11-16 09:32:44 +07:00
dotCooCoo fd55592167 Ellipse: a circle drawn from its center snaps its radius to touch a nearby path
With Smart Guides and Snap to Tangent on, an Alt+Shift drag with the
Ellipse tool snaps the circle's radius so that the circle touches a
nearby path, when the radius comes within the snapping tolerance of that
size. The touch point is where the line from the center meets a straight
segment or a curve square, inside a segment or at an anchor where the
path runs smoothly, including an anchor where a curve's handle lies on
the anchor. A circle can touch another circle from outside or from
inside. Corners, open path ends and curves around the same center are
not offered.

The touch point shows the "tangent" label, the radius is measured along
the Constrain Angle's axes, and Space moves the circle at the size it
snapped to, which it keeps when Space is let go. When an anchor, center or crossing is near the pointer, or
the dragged corner snapped onto one, the circle is not resized. An
ellipse without Shift is not snapped. Snap to Grid and pixel snapping
place the point instead, also when turned on during the drag, and
turning Snap to Tangent off during the drag stops the snap. A press
with a small jitter is still a click rather than a drag. Each pointer move
measures at most 256 segments near that radius.
2026-11-15 18:23:55 -08:00
dotCooCoo 56d0feddf9 Tool overlays: pieces of a long drag's line meet halfway along a segment
Each piece of a long drag's line also held the first segment of the next
piece, so that segment was drawn twice, once by each piece. Where the
line is thin or partly covered at its edges, the doubled coverage drew a
darker stretch every 64 segments. A piece now ends halfway along the
segment after its last point, and the next piece starts there, so a wide
line still turns at the piece's last point as one line does.
2026-11-15 17:10:18 -08:00
dotCooCoo 9eb6a0fc48 Merge main into feat/eraser-shift-line 2026-11-15 16:07:54 -08:00
BFlat 89ebbd754a Merge pull request #7898 from dotCooCoo/fix/live-paint-strokeedge-through-edges
Live Paint: livePaint.strokeEdge refuses a through id that is not one of the group's edges
2026-11-16 06:56:07 +07:00
BFlat 75dc7dcd20 Merge pull request #7964 from dotCooCoo/feat/ellipse-anchor-count
Ellipse: the click dialog sets how many anchors the ellipse has
2026-11-16 06:55:58 +07: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 6a692299d0 Tool overlays: long drags keep their line in shared pieces instead of rebuilding it every frame
The line that a round Eraser, the Knife, the Path Eraser, the Pencil with
Live preview off or a smoothing drag shows was one path of every point,
copied, flattened and tessellated again each frame, and with the
Eraser's Size following the pen each step was a new path each frame.

- A drag of more than 64 segments now shows in pieces of 64 segments,
  each also holding the next piece's first segment so wide lines join
  as one. Pieces the drag has passed come back as the same shared path,
  and the canvas reuses their triangles while the view stays the same;
  only the last piece is built again, and only when it changed.
- With Size following the pen, each step is kept as its own shared path
  and only a new or moved step is built.
- The Knife's pieces carry where the dash pattern starts, so the dashes
  run on across pieces (Overlay::SharedPath gains `dash`).
- The smoothing band is shared until it changes.

The canvas still copies the kept triangles into each frame. Release
commands (path.eraseRegion, path.knife, path.eraseSegments,
path.freehand) are unchanged.
2026-11-15 15:36:57 -08:00
BFlat 35b88efd26 Merge pull request #7914 from dotCooCoo/fix/eraser-varied-drag-area
Eraser: the drag's area outline takes the tip the pen gives at each step
2026-11-16 04:30:09 +07:00
dotCooCoo 24c0f89ff9 Part of #7840: the Ellipse dialog sets how many anchors the ellipse has
A click with the Ellipse tool opens a dialog with a new Anchors field
under Height, 4 by default. With 4, OK draws the same live ellipse as
before. Any other count from 2 to 1000 draws a closed plain path with
that many smooth anchors spaced evenly by angle, from the left one and
clockwise, with handles of 4/3*tan(theta/4) scaled along each axis and
the path fitted to the typed width and height. The dialog sends the
nearest whole number from 2 to 1000 (4 for an empty field or text that
is not a number). The count confirmed last is kept as the Ellipse
tool's anchors option, and the next Ellipse dialog opens on it.

shape.ellipse takes an optional anchors param (default 4). A number
that is not a whole number from 2 to 1000 gets one error naming that
range, a value that is not a number gets the usual type error, and
nothing is drawn. The MCP draw_shape tool lists anchors for ellipses.

Docs: params text, docs/mcp.md, docs/target-app-parity.md (Shapes).
2026-11-15 12:16:26 -08: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
dotCooCoo 3e7c19829b Eraser: each step of the drag's area outline takes the tip halfway along it
A step took the tip halfway between the tips at its ends, turned the
shorter way round. The release reads the pen's pressure and tilt halfway
along the step, and its bearing and rotation halfway the shorter way
round, so a step from no pressure to full pressure with the angle on
Pressure by 90° erases with a level tip there while the outline showed
it upright. Each step now takes the tip of the pen's readings halfway
along it.
2026-11-15 11:36:38 -08:00
dotCooCoo d05923aa34 Gradient tool: dragging the end handle changes only the length, Alt-drag the length and angle
A plain drag of the annotator's end handle now slides the end along the
bar's line, at least 10 px from the start, and snaps only to targets on
that line. Alt-drag moves the end freely, changing the length and angle
together, with Shift at Constrain Angle steps. A vector of no length
still moves freely.

Docs: docs/mcp.md, docs/ui-parity.md.
2026-11-15 11:34:56 -08:00
dotCooCoo 5bba196c4f Path Precision Tools: Trim at Crossings shows the stretch a click would remove
Hovering with the Trim at Crossings Tool draws in red the stretch a click
there would remove, on the same paths and by the same rules as the click,
and nothing over empty canvas or hidden and locked paths. A drag draws
every stretch its rectangle or freehand line would remove while it
reaches at most 32 paths. In isolation mode only paths inside the
isolated object are highlighted.

What a pick removes moves from the command into
vectorcraft_tools::addons::trim::plan, which the command and the tool
both use. A preview spends at most a twentieth of the crossing work a
click may (Work::share); past that it shows nothing, and the click or
release still removes what it reaches. The tool keeps the crossings it
found for the document as it is, so moving along one path does not
search again, and kept crossings still count against a pick's work
budget. Work::spent_since and Work::draw in vectorcraft-pathops measure
and charge that work.

Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md.
2026-11-15 11:24:17 -08:00
dotCooCoo 09a16f262f Eraser: the drag's area outline gives the first lean's bearing to the points before it
The release reads the bearing of the first point the pen leaned 1° or
more at for the points before it, while the outline kept the set value
there. The outline now takes that bearing too, and starts again when the
first lean arrives, also when a pen tilted in place at the last point
gives it.
2026-11-15 11:16:34 -08:00
dotCooCoo 70df1ff5b3 Eraser: Shift keeps the drag on a horizontal, vertical or diagonal line
With Shift held, an Eraser drag stays on the line from the press point at
the 45 degree step from the Constrain Angle that the pointer lies nearest
to. The step is taken once the pointer is 3 screen pixels from the press
and holds until Shift is released; the tip outline follows the line.
Released, the drag goes on freehand from the last point on the line, and
Shift again takes a new step from the press point.
2026-11-15 11:08:32 -08:00
dotCooCoo db61abcef0 Eraser: the drag's area outline matches the release when pressure or a mode starts mid-drag
Once the pen pressed less than fully, the steps of the outline already
built kept the tip of a stroke without pressure, while the release reads
full pressure at those points. The outline now starts again when the
pressure first counts.

A Tilt, Bearing or Rotation mode set during the drag gave the early
points the pose of later ones. The release reads no poses for such a
stroke, so the outline now keeps the set values for them too, and the
same for a Pressure mode set during the drag.
2026-11-15 10:50:23 -08:00
BFlat eaadc48d5a Merge pull request #7835 from dotCooCoo/feat/contextual-task-bar-smooth-free-transform
Contextual Task Bar: the Smooth tool shows its Fidelity and Tool Options
2026-11-16 01:32:29 +07:00
BFlat e1f8a15d61 Merge pull request #7855 from dotCooCoo/fix/live-paint-shift-triple-click-joined-faces
Live Paint: test that a Shift-triple-click keeps joined faces of the same fill
2026-11-16 01:32:15 +07:00
dotCooCoo 58fc13a1e0 Eraser: the drag's area outline takes the tip the pen gives at each step
The outline of the area an Eraser drag covers used the set Angle and
Roundness and varied the Size only with Pressure, while the release
(since #7726) erases with the tip the pen gives at each point on the
Pressure, Tilt, Bearing and Rotation modes.

Each step now takes the tip halfway between those at its ends, read as
the release reads the stroke. A step whose angle or roundness varies is
outlined where its own tip is round, and the parts inside other steps'
areas are removed as before. A pen turned in place gives the last step
the new tip, and a changed mode or Variation starts the outline again.
A round tip whose Size follows the pen shows each step that wide.
Random shows the value itself until the release draws it.
2026-11-15 10:23:55 -08:00
dotCooCoo 65b2129138 Live Paint: livePaint.strokeEdge refuses a through id that is not one of the group's edges
`through` now takes only the ids of the group's edges, each once: a face's
id, an unknown id, another group's edge or an edge given twice is an error
and changes nothing. A hidden edge in it is still skipped by the join. For
a double-click the Bucket passes only edges of the group, each once, so an
earlier click that filled a face whose fill was the edge's stroke paint
(Paint Fills and Paint Strokes both on) no longer sends that face.

The Bucket finds the faces a fill drag crossed among those whose bounds
meet the drag's bounds only.

A canvas test covers the middle-button press and the Space-held press
between two Bucket clicks. The progress-doc line lists the new tests, and
docs/mcp.md says which edges the tool passes in `through`.

Follows #7875.
2026-11-15 09:00:15 -08:00
dotCooCoo d86c9871c6 Live Paint: a triple-click after a release across an edge matches the fill from before it
When a click's press lands in one face and its release in the next, the
drag fills both. The bucket now notes the fill every face the drag
crosses had before the press, the release included, so a double-click
or triple-click that follows on such a face compares that fill instead
of the one the first click gave it. This also holds when the release of
the last click crosses into the clicked face.

When the first click makes the Live Paint group, or merges the selection
into a selected group, the crossed face counts with the fill it was made
with: a kept face's paint from the merged group (an unplaced gradient
fixed to its fit), else the fill Make gives it, the topmost fill that
draws of the front-most source path over it that has one. A selected
group's edges no longer count as source paths.

A double-click whose two clicks land on two joined edges now paints the
edges joined through the other edge its clicks painted:
livePaint.strokeEdge takes `through`, edge ids that the join counts as
drawing with `match`, and the tool passes that edge. When the second
press lands on the next edge and is released back on the first, the
double-click matches the first edge's stroke paint from before the
first click.

A press that the view tools take (held Space, the middle button), or
that holds Cmd/Ctrl and goes to the lent selection tool, now counts as
a press that paints nothing, so the clicks around it are not taken for
one triple-click's: the session tells the tool through the new
Tool::press_elsewhere.

The tool doc, docs/mcp.md and the progress-doc line now say that a click
records an undo step only when it changes a paint, and that a
triple-click paints the faces that have the clicked face's fill (and the
edges that draw with the clicked edge's stroke paint) with the bucket's
paint.

Follows #7291.
2026-11-15 07:19:56 -08:00
dotCooCoo f021c29b6f Live Paint: test that a Shift-triple-click keeps joined faces of the same fill
A Shift-triple-click on a face whose double-click already reached a
joined face of the same fill selects every face with that fill. The new
test pins that the joined face the double-click toggled on is not
toggled off again by the triple-click.
2026-11-15 06:44:48 -08:00
dotCooCoo f459465407 Contextual Task Bar: the Smooth tool shows its Fidelity and Tool Options
While the Smooth tool is in use with a path it can smooth selected, the
bar shows the tool's Fidelity field and Tool Options..., which opens the
Smooth tool's options. The field sets Fidelity through tool.setOption
with the same range, unit and steps as the field in the options dialog.
With nothing smoothable selected, the tool shows no bar. The bar leaves
out the selection tools' actions and the Fill, Stroke, Recolor Artwork
and Lock controls. On a canvas too narrow for the field, More Options
lists Fidelity, which opens the tool's options.

The Smooth tool's cursor and the bar share one check of the selection,
which the bar keeps for the document's revision.
2026-11-15 03:56:40 -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
BFlat 0473b74e42 Merge pull request #7781 from dotCooCoo/feat/flare-drag-keys
Flare: Ctrl/Cmd holds the center and Up/Down and ~ change the rings while they are placed
2026-11-15 16:40:37 +07:00
dotCooCoo b8b002a662 Merge main into feat/editing-one-anchor-copies-the-whole-anchor-list 2026-11-15 00:21:39 -08:00
BFlat 4a5f07b8c3 Merge pull request #7753 from dotCooCoo/feat/info-panel-tool-readouts
Info: the panel shows the move, transform, Zoom and Paintbrush values of the tool in use
2026-11-15 13:50:30 +07:00
BFlat 8e1e344f84 Merge pull request #7752 from dotCooCoo/fix/perspective-infer-followups
Perspective: Automatic Plane Positioning checks a held plane's own place and finds skewed intersections
2026-11-15 13:50:21 +07:00
BFlat fd6b3fb9a9 Merge pull request #7748 from dotCooCoo/feat/live-paint-selection-triple-click
Live Paint: a Live Paint Selection triple-click selects the parts of the same paint
2026-11-15 13:49:42 +07:00
dotCooCoo f4dc71aee8 Flare: Ctrl/Cmd holds the center and Up/Down and ~ change the rings while they are placed
While the center is dragged out, Ctrl (Command on macOS) keeps the
center's diameter as the last drag showed it, and the drag sizes the
halo through shape.flare's growth: the halo's radius keeps the ratio to
the pointer's distance that it had when the key went down, within the
Flare Tool Options' 0 to 300 %. Letting the key go sizes the center with
the drag again, and the flare keeps the new growth.

While the rings' end point is placed, Up and Down Arrow add and remove
rings within 0 to 50, and leave the rays as the center drag left them.
Before, they changed the rays in both drags. Each press of ~ (backquote)
sends a new ringSeed. shape.flare takes ringSeed, a whole number below
2^53, and places the rings along the path from a sequence of its own,
keeping their count and sizes and the other parts. seed and ringSeed
given as a fraction, a negative number or a boolean are refused. The
canvas re-hovers the tool when backquote goes down or up, so ~ works with
the pointer held still.

With Rings off, the arrows and ~ do not change the flare in the second
step. Each new flare starts from the options' counts and growth, without
a ringSeed.
2026-11-14 22:39:10 -08:00
dotCooCoo 7104cd05f3 Merge main into feat/editing-one-anchor-copies-the-whole-anchor-list 2026-11-14 22:05:53 -08:00
dotCooCoo bcadfc7ac8 Info: the panel follows the tool in use
While the Selection, Direct Selection or Group Selection tool moves the
selection, or the Gradient tool draws a vector, W and H show the change
in x and y, with the distance and the angle under them. A Scale tool
drag shows its percentages; a Rotate, Reflect or Shear tool drag shows
the center of the selection's box and its angles. The Zoom tool adds the
magnification and the Paintbrush the name of its brush.

W and H follow Use Preview Bounds. With several objects selected, the
panel shows only the fill, stroke and type values they share, and Show
Options adds a tint's swatch and percentage and a gradient's swatch name.

- Tool::readout and Readout (crates/tools/src/readout.rs).
- info.readout returns the selection's size and the tool's readout.
- Docs: docs/mcp.md, docs/ui-parity.md.
2026-11-14 21:31:28 -08:00
dotCooCoo 4516cff69a Perspective: Automatic Plane Positioning checks a held plane's own place and finds skewed intersections
- perspective.grid.set rejects an offset that puts a plane behind the
  viewer even while Automatic Plane Positioning holds that plane, so the
  plane does not vanish when positioning ends.
- The gridline intersection nearest the pointer is found on strongly
  skewed planes: each drawn line is searched at the point nearest the
  pointer on the page, instead of a few cells around the pointer's
  inverse.
- Moves while an artboard name is pressed no longer reach the tool as
  hover, so Shift does not position the plane while the button is down.
2026-11-14 21:26:52 -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 d62de12db6 Live Paint: Live Paint Selection triple-click selects parts of the same paint
A triple-click with the Live Paint Selection tool on a face now selects
every face of its group with that face's fill, and on an edge every edge
of its group that draws with that edge's stroke paint. Hidden faces and
edges are left out. Before, a triple-click selected only what its third
click selected.

With Shift held, the parts are toggled from the selection there was
before the clicks: the tool keeps what the double-click and the Shift
clicks of the series toggled, and the triple-click toggles those back.

docs/target-app-parity.md's Live Paint Selection line says so.
2026-11-14 21:02:05 -08:00
BFlat 2607a98c1f Merge pull request #7726 from dotCooCoo/feat/eraser-tip-variations
Eraser: Angle, Roundness and Size vary with Random, Pressure, Tilt, Bearing or Rotation
2026-11-15 11:37:51 +07:00
BFlat 26878d3d0e Merge pull request #7715 from dotCooCoo/fix/svg-open-path-type-before-start
Type on a path: type on an open path can start before the path
2026-11-15 10:46:42 +07:00
dotCooCoo 397adce4c8 Merge main into feat/eraser-tip-variations 2026-11-14 18:55:44 -08:00
BFlat 40f096f32b Merge pull request #7213 from dotCooCoo/feat/rotated-box-scale-reflect
Transform: Scale and Reflect act along a rotated bounding box
2026-11-15 09:47:18 +07:00
BFlat b46fb077b7 Merge pull request #7566 from dotCooCoo/fix/tool-overlays-reuse-settled-outline
Blob Brush: a long drag's settled outline is reused from frame to frame
2026-11-15 09:46:53 +07:00
dotCooCoo e97a7172b6 Eraser: the tip outline turns with a pen turned in place and passes 1296 pt
A drag or release within a pixel of the last stroke point now gives
that point the pen's tilt and rotation, so the outline and the erased
area follow a pen turned or tilted in place. A release without a pen
reading keeps the last pose. The outline's size on Pressure, Tilt,
Bearing or Rotation goes past 1296 pt, as path.eraseRegion sweeps it.
2026-11-14 18:03:31 -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 67fd1cd127 Merge main into feat/live-paint-bucket-multi-click 2026-11-14 15:48:45 -08:00
dotCooCoo 094971e3ac Type on a path: type on an open path can start before the path
Type on an open path can now start before the path's start: its start
is stored below 0, the span runs from there, and the characters whose
middle falls before the path's start are not drawn, as SVG 2 lays out
text on a path (https://www.w3.org/TR/SVG2/text.html#TextLayoutPath).
The text keeps every character, and the start bracket stays at the
path's start. Past the path's end, text that does not fit is overflow,
as for other type on a path. Type that starts on the path draws every
glyph as before.

- SVG import keeps a <textPath> start before an open path's start
  (text-anchor end or middle, or a negative startOffset) instead of
  starting the text at the path's start, which drew every character.
- SVG export writes it as a negative startOffset.
- PDF export writes only the characters drawn on the path.
- The legacy .ai and .ai editing data writers write the type from the
  path's start with the type attributes warning.
- type.pathOptions takes a start below 0 for type on an open path; on a
  closed path it is the path's start, as before. A flip starts the type
  at its start bracket. Dragging the center bracket slides it from where
  it starts, and no further before the path.
- A click at the path's start places the caret by the first drawn
  character, and the caret in the hidden characters stands at the
  path's start. The highlight of substituted fonts and glyphs leaves
  them out.
- Release Type on a Path keeps the first drawn glyph where it was
  drawn, with the hidden characters before it.
- The Touch Type tool shows no box for a hidden character, and
  text.touchType returns an error for one. A character with a drawn
  glyph is changed by that glyph.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-14 15:44:12 -08:00
dotCooCoo 93a7d532c7 Merge main into feat/rotated-box-scale-reflect 2026-11-14 15:17:16 -08:00
BFlat a92993daf9 Merge pull request #7582 from dotCooCoo/fix/clip-effects-hit-test
Selection: clicks in a clip group follow the region its clipping path's effects give it
2026-11-15 06:16:57 +07:00
BFlat c0ce77a912 Merge pull request #7663 from dotCooCoo/feat/perspective-auto-plane-positioning
Perspective: Perspective Grid Options has Automatic Plane Positioning
2026-11-15 05:30:40 +07:00