Commit Graph
887 Commits
Author SHA1 Message Date
dotCooCoo 58bc03a3e7 Gradient tool: a vector drawn on the art snaps as other drawn points do
A gradient vector drawn on the art, a click that applies one, and the
dragged start and end handles snapped through snap_draw, which gathers
the bounds and anchors of the art only. Path segments, View › Snap to
Glyph's guides and the construction guides through the vector's start
did not pull them, and a click applied the gradient from the pointer
rather than from the snapped point. They now snap through DrawSnap, as
the Pen and Line Segment tools do:

- The press gathers the targets, for a vector drawn on the art and the
  start and end handles only, and the drag keeps them. A click applies
  the gradient from the snapped press.
- A dragged end or handle leaves its start as a Line Segment's end does:
  it lands on the construction guides through the start, and with Shift
  it keeps to 45° steps from the Constrain Angle and snaps along them.
- The pointer hovering where a press would draw a vector (anywhere with
  art selected, over art with nothing selected), and not over the
  annotator, shows the guides of the point the vector would start on.

A press that snaps onto a nearby target no longer starts the drag
early: the 3 px drag threshold counts from where the pointer was
pressed, not from the snapped start.
2026-11-13 22:25:34 -08:00
dotCooCoo a903feb870 Dimension tool: no construction guides through a first point off the anchors
With Smart Guides on, the Dimension tool's second point snapped onto the
construction guides through the first point (Smart Guides › Construction
Guides), so a click beside a segment straight below a first point that
was not on an anchor stayed on the vertical guide instead of landing on
the segment.

The second point now has no construction guides through a first point
that is not on an anchor. After a first point picked on an anchor, the
construction guides through it still apply. The second point still snaps
to anchors, centers and alignment lines, and with Snap to Perpendicular
or Snap to Tangent on it lands where the line from the first point meets
a segment square or grazes a curve.

Docs: docs/dimensions.md, docs/target-app-parity.md.
2026-11-13 21:26:04 -08:00
dotCooCoo ce3445d106 Live Paint: a Cmd double-click or triple-click with the Bucket paints nothing
With Cmd (Ctrl) held, the Bucket's presses go to the selection tool Cmd
lends, but the double-click and triple-click that follow reached the
Bucket and painted. They now paint nothing, as with Alt.
2026-11-13 19:38:18 -08:00
dotCooCoo 9644811965 Merge main into feat/live-paint-bucket-multi-click 2026-11-13 19:18:43 -08:00
dotCooCoo bc2caaaa37 Live Paint: a triple-click matches the first fill of a face clicked again
A triple-click whose clicks land on a face, another face, then the first
face again matched the fill the first click gave that face. It now
matches the fill the face had before the first click that painted it, as
the tool's doc comment and docs/mcp.md say.

- With Space held for the view tools, the Live Paint Bucket outlines no
  face or edge, as a press there paints nothing.
- A scoped livePaint.fill or livePaint.strokeEdge where every face or
  edge reached already has the paint records no undo step; a test covers
  it, and one where only some faces need the paint.
- An MCP test drives the bucket through ui.pointer with mods.space.
- The tool's doc comment and the progress line state the rule.
2026-11-13 19:10:40 -08:00
dotCooCoo dea57b348b Dimension tool: the first preview of a drag-out is drawn at the pointer
Dragging out a dimension from a segment (Linear) or a corner (Angular)
drew its first preview frame at the wrong distance. The preview placed
the dimension at the pointer before reading the segment's end points or
the corner from the art, and measured the offset from the placeholder
points the dimension starts with. A drag from the top edge of a
rectangle to 40 pt above it showed an offset of 60 instead of -40.

The preview now clears the offset, reads the art's points, places the
dimension at the pointer and checks the result. Clearing the offset
keeps an out-of-range offset from the last pointer position from
failing the read.

Tests: the segment and corner drag-out tests fail without the change.
placement_recovers_after_a_position_out_of_range also passes on main;
it fails when only the offset clear is removed.
2026-11-13 19:08:02 -08:00
dotCooCoo 1dc8b72bbf Type: hyphenated type lays out again when the hyphenation exceptions change
Changing Preferences › Hyphenation › Exceptions bumped each open
document's revision, but the caches of laid-out type outside the text
crate were keyed on the font generation alone. The renderer kept the
glyph geometry, raster-effect pixels, live-effect and envelope art,
pattern tiles and placed symbol art of unchanged type objects, so
hyphenated area type kept its old line breaks on the canvas. The
hit-test art of blends and envelopes, the Fit to Artwork Bounds answer,
the layout caches of the Type and Touch Type tools and the out port's
overflow mark were keyed the same way.

vectorcraft_text::layout_inputs() returns a number that changes with
the fonts and with the hyphenation exceptions. Every one of those
caches now keys on it instead of FontDb::generation(), and envelope ink
uses it in place of the private envelope_ink_inputs(). The hit-test key
hashes it together with the plug-in revision.

Tests: a renderer that drew hyphenated area type, alone, with a drop
shadow, in a group with a Transform effect, in a symbol instance and in
an envelope, draws it as a new renderer does after the exceptions
change; the out port of selected area type shows the overflow that the
new exceptions cause. The render test helpers that run a step again
when the fonts change during it now also run it again when the
exceptions change.
2026-11-13 18:56:48 -08:00
dotCooCoo fecf724501 Smart Guides: Parametric Shape and Slice tools snap as the drawing tools do
The Parametric Shape tool's center and the Slice tool's corners snapped
with Smart Guides to the bounds of the art only, so View › Snap to Glyph
had no effect on them, and neither did the anchors and segments of
paths that the other drawing tools snap to. The point dragged out from a
Parametric Shape's center did not snap at all, and neither tool showed
Smart Guides while hovering before a press.

Both tools now snap through the drawing tools' shared snapping
(DrawSnap). A Parametric Shape's center (from a drag or a double-click),
the point dragged out from it, and a slice's corners land on glyph
guides and on path anchors and segments. The guides show while hovering
and during the drag. When a ruler guide then takes a slice corner, the
Smart Guides are no longer shown. A click with the Parametric Shape tool
still draws nothing when its center snaps a few pixels from the pointer.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-13 18:50:03 -08:00
dotCooCoo 89bbca79e8 Shape Builder, Live Paint Selection: hover highlights go when the pointer leaves the canvas
The Shape Builder had no hover_ended, so when the pointer left the canvas
(for a panel, out of the window, under a menu or dialog), the region or
stroke highlight and the Cursor Swatch Preview chips stayed where the
pointer was last seen. A map of a large selection that arrived afterwards
also highlighted the region under that old point again. When the hover
ends, the tool now drops the highlight, the stroke a click would split and
the preview, and forgets the point.

The Live Paint Selection tool had the same gap: its face or edge
highlight now goes too.
2026-11-13 18:20:59 -08:00
dotCooCoo f59381ab59 Live Paint: a triple-click matches the paint of the face its last clicks painted
A double-click or triple-click compares the paint the face or edge had
before the first of its last clicks that painted it. A first click that
made the Live Paint group counts only when the face it filled is that
face, so clicks that move from one face to another no longer match the
paint under the first click.

With Space held for the view tools, a press, a double-click or a
triple-click with the Live Paint Bucket paints nothing.

The ui.pointer row in docs/control-protocol.md escapes the pipes in its
parameters cell, so the table keeps three columns.
2026-11-13 18:19:05 -08:00
ncic 5a55fdce0e Merge upstream main into pencil-cursors
# Conflicts:
#	docs/mcp.md
#	docs/target-app-parity.md
2026-11-14 03:17:11 +01:00
dotCooCoo 33319b2c4d Merge main into feat/live-paint-bucket-multi-click 2026-11-13 18:04:02 -08:00
dotCooCoo 4dd3809f84 Live Paint: triple-click test checks the face the planar map makes
The test for a triple-click whose first click makes the group now also
builds the planar map from the same two paths and checks that the face
at the click takes its fill from the square. The doc comment of the
double-click flood names the three points it checks along each edge
segment.
2026-11-13 17:43:37 -08:00
dotCooCoo 270e58a461 Live Paint: the Bucket's swatch preview and highlight go when the pointer leaves the canvas 2026-11-13 17:24:40 -08:00
dotCooCoo f74fe81292 Live Paint: the swatch preview follows the release point; nudges read the key press's modifiers
- After a fill drag, the Live Paint Bucket stores the release point, so the
  cursor swatch preview shows there instead of where the pointer last moved
  before the press.
- Arrow nudges and Alt+arrow type spacing read Shift and Alt from the key
  press, as the tool keys do, so a modifier released within the same frame
  still makes a 10 pt nudge, a copy, or a spacing step.
- tool.setOption accepts cursorSwatchPreview for the Live Paint Bucket and
  refuses a value that is not true or false.
2026-11-13 17:19:33 -08:00
dotCooCoo 52aec70e19 Live Paint: double-click floods along split edges, triple-click on new art skips open paths
- A face outline segment that runs along several edge segments (the
  face has no corner where a crossing line splits the edge) now joins
  the face to every edge segment it runs along, not only the one under
  its middle, so a double-click flood no longer stops there.
- The first click of a triple-click on selected paths, which makes the
  Live Paint group, takes the fill to match from the paths' closed
  subpaths only, as the group's faces do; an open path in front no
  longer gives the wrong fill.
2026-11-13 17:05:06 -08:00
ncic 8a449cb98e Pencil: badged cursors keep their badge with Use Precise Cursors
The Pencil's and the Paintbrush's new-path, continue, close and straight-line
cursors are drawn on the crosshair already; Precise Cursors no longer turns
them into the plain crosshair, so the badge still says what the press or the
release does.
2026-11-14 01:45:40 +01:00
dotCooCoo ab44332804 Merge main into feat/smooth-cursor-without-path 2026-11-13 16:43:32 -08:00
dotCooCoo 0cb2b435a8 Live Paint: a Live Paint Selection double-click selects the connected faces or edges
A double-click with the Live Paint Selection tool on a face now selects
that face and the faces of its group that no stroked edge parts from it:
the selection floods across edges that are hidden or draw no stroke, and
hidden faces are left out. On an edge (Alt-double-click, or a
double-click with Select Fills off) it selects the edge and the edges of
its group joined to it end to end that draw with the same stroke paint.
With Shift held, the faces or edges reached leave the selection or join
it. The tool options, locks and isolation mode apply as they do to a
click.

The reach is computed by two read-only functions in the builder lookup
module, flood_faces and connected_edges, so the Live Paint commands can
use the same rules. An edge's stroke paint is the paint of its topmost
stroke that draws. Face outlines are matched to edges within the planar
map's precision, and edges join only at the ends of their subpaths.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-13 16:23:32 -08:00
dotCooCoo d30831bd5a Merge main into feat/live-paint-cursor-swatch-preview 2026-11-13 15:54:47 -08:00
dotCooCoo 6829dc02b8 Merge main into feat/smooth-cursor-without-path 2026-11-13 15:27:54 -08:00
BFlat 2beda0487e Merge pull request #7251 from ncic/snap-labels
Snap to Point draws no Smart Guides labels or lines with Smart Guides off
2026-11-14 06:26:14 +07:00
ncic 9709c871fc Merge upstream main into pencil-no-guides
# Conflicts:
#	docs/target-app-parity.md
2026-11-13 23:52:26 +01:00
BFlat 517b725be5 Merge pull request #7089 from dotCooCoo/fix/smooth-fidelity-screen-pixels
Smooth: Fidelity is in screen pixels, so a drag smooths as much at any zoom
2026-11-14 05:42:42 +07:00
BFlat 64c6387b84 Merge pull request #7260 from dotCooCoo/fix/tool-options-refuse-invalid
Live Paint and Shape Builder: tool.setOption refuses invalid options
2026-11-14 05:42:33 +07:00
dotCooCoo ff846e1483 Merge main into feat/smooth-cursor-without-path 2026-11-13 13:50:39 -08:00
ncic eaa3efe45e Merge upstream main into pencil-no-guides
# Conflicts:
#	crates/tools/src/draw2/gesture/tests.rs
#	docs/target-app-parity.md
2026-11-13 22:49:03 +01:00
ncic 1b3454b4f8 Merge upstream main into snap-labels
# Conflicts:
#	docs/target-app-parity.md
2026-11-13 22:48:42 +01:00
BFlat bf0f78f9c4 Merge pull request #7256 from dotCooCoo/fix/blob-brush-preview-bounded
Blob Brush and Eraser: the drag outline does a bounded amount of work per frame
2026-11-14 04:31:48 +07:00
BFlat d15a725626 Merge pull request #7216 from dotCooCoo/feat/trim-at-crossings
Path Precision Tools: Trim at Crossings removes the stretch of a path between crossings
2026-11-14 04:30:27 +07:00
ncic b67a08dc0a Pencil: shows where a stroke continues, connects and closes
The continuation cursor (a short rising line) shows over an open end of a
selected path before any press, freehand too, and while a continuing stroke
nears an open end of another selected path it connects to. The straight-line
cursor becomes a short level line. A stroke continuing a path, a straight line
too, shows the closing ring within Close Paths When Ends Are Within of the
path's other end, and the release closes it; path.freehand takes the tool's
closed for extend instead of its own four-Fidelity distance.
2026-11-13 22:29:09 +01:00
dotCooCoo 4ea2f2e9c6 Merge main into fix/smooth-fidelity-screen-pixels 2026-11-13 13:03:29 -08:00
dotCooCoo f9e796cb10 Live Paint: double-click floods across unstroked edges, triple-click paints the same paint
With the Live Paint Bucket, a double-click on a face fills it and every
face reached across edges that are hidden or draw no stroke; a stroked
edge, a hidden face and a Gap Detection gap stop it. On an edge, a
double-click paints the edges joined to it end to end with the same
stroke paint. A triple-click fills every face of the group with the
clicked face's fill, or paints every edge with the clicked edge's
stroke. Shift and the Paint Fills and Paint Strokes options choose a
face or an edge as for a click; Alt held paints nothing.

- livePaint.fill and livePaint.strokeEdge take scope ("one", the
  default, "connected" or "samePaint") and match, the paint compared,
  and reply with count. A bad scope or match is an error, and scope
  with a drag's points is refused.
- Each click of a double-click or triple-click paints as it arrives,
  as its own undo step. For a triple-click, and for a double-click on
  an edge, the tool sends as match the paint the face or edge had
  before the first of those clicks, including a first click that makes
  the Live Paint group from the selected paths. A double-click on a
  face sends no match.
- PointerKind::TripleClick is new: the canvas sends it on egui's
  triple-click unless a modal dialog is open, as for a double-click,
  and ui.pointer and pointer_gesture take "tripleclick".

Docs: docs/mcp.md, docs/control-protocol.md, docs/target-app-parity.md.
2026-11-13 13:01:02 -08:00
BFlat 50084b789f Merge pull request #7243 from dotCooCoo/fix/smooth-segment-under-drag
Smooth: a drag along a segment smooths it when its anchors are out of reach
2026-11-14 03:23:45 +07:00
dotCooCoo add71548db Merge main into fix/blob-brush-preview-bounded 2026-11-13 12:15:59 -08:00
ncic ee52e6b167 Merge remote-tracking branch 'upstream/main' into pencil-no-guides 2026-11-13 21:09:31 +01:00
ncic 09d3d2a76a Merge remote-tracking branch 'upstream/main' into snap-labels 2026-11-13 21:09:17 +01:00
dotCooCoo dd3438cb7f Live Paint Bucket: Cursor Swatch Preview and arrow keys pick swatches
Live Paint Bucket Options gets a Cursor Swatch Preview checkbox (on at
first, saved with the other options). With the Bucket selected, Left and
Right set the active fill, or the stroke when the Stroke proxy is in
front, to the color swatch before or after it in the Swatches panel,
wrapping around at the ends, with the preview on or off. The selected art
keeps its paint. The preview shows the active paint above the pointer
between the swatches before and after it; a color that is no swatch shows
alone until Right picks the first swatch or Left the last, and a paint
that is not a solid color shows no chip. The chips hide during a fill
drag and while Alt samples with the eyedropper. The fill and the stroke
each remember the swatch picked for them, so swatches of the same color
are each reached in turn.

The Bucket and the Shape Builder now take the arrows for swatches only
without Shift, Alt or Cmd/Ctrl, judged by the modifiers held when the key
went down, so modified arrows keep their shortcuts
(Tool::claims_key_with, Session::tool_claims_key_with).

Docs: docs/mcp.md, docs/target-app-parity.md, tool.options params text.
2026-11-13 12:09:16 -08:00
ncic 2a9c32bc39 Merge remote-tracking branch 'upstream/main' into pencil-no-guides
# Conflicts:
#	crates/tools/src/draw2/gesture.rs
#	docs/target-app-parity.md
2026-11-13 20:50:22 +01:00
FredApps 4db24740e4 Merge branch 'main' into fix/spiral-decay-setting-20261011
# Conflicts:
#	crates/engine/src/tests/toolsettings.rs
2026-11-13 20:48:28 +01:00
dotCooCoo 82bf9624bf Smooth: the cursor shows Not Allowed when no path is selected to smooth
The Smooth tool showed its own cursor with nothing selected, though a
drag then changes nothing. It now shows Not Allowed until a path it can
act on is selected (an editable path, not a guide, with three or more
anchors on one of its subpaths); a selected path anywhere on the canvas
gives the Smooth cursor wherever the pointer is.

- The Pencil with Alt key toggles to Smooth Tool on and the Blob Brush
  show Not Allowed the same way when Alt gives them the Smooth tool. The
  Paintbrush keeps its closing cursor, since its release with Alt closes
  the stroke.
- A Smooth release, from the Smooth tool or from the Pencil, Paintbrush
  or Blob Brush with Alt, sends path.smoothRegion only while such a path
  is selected. With only type or other objects selected it sends no
  command.
- Use Precise Cursors leaves Not Allowed as it is.
- The cursor catalog and docs/target-app-parity.md describe the rule.
2026-11-13 11:44:24 -08:00
dotCooCoo 51e8938374 Blob Brush and Eraser: the drag outline does a bounded amount of work per frame
The outline of the area a Blob Brush or Eraser drag covers was outlined
again for the whole stroke on every frame, so a long stroke slowed the
canvas as it grew.

- The drag is outlined in pieces of up to 32 segments (one segment each
  with Size set to Pressure), and a frame outlines again only the pieces
  it added segments to. A grid of squares lists the segments near each
  square, and each piece's outline drops the parts inside the rest of
  the area, so the pieces show as one edge.
- One frame takes at most 256 new points and a fixed amount of work;
  Tool::overlays_pending makes the canvas draw again until the rest is
  done with the pointer still. Points not outlined yet show as a thin
  line, and the tip shows at the pointer.
- The settled outline is kept in joined paths of 64 pieces, and a frame
  joins again only the paths that changed. The grid's size is capped.
- The Blob Brush's length label and the Size-by-pressure check keep
  running values instead of rescanning the stroke each frame. With Size
  set to Pressure the outline shows only the edge of the whole area.

The release sends the same path.blob and path.eraseRegion parameters.
2026-11-13 11:40:53 -08:00
BFlat 5f8e4c1913 Merge pull request #7240 from dotCooCoo/feat/smooth-reach-overlay
Smooth tool: the drag shows the band the tool smooths
2026-11-14 02:40:24 +07:00
dotCooCoo 1d35e00981 Live Paint and Shape Builder: tool.setOption refuses invalid options
tool.setOption for the Live Paint Bucket, the Live Paint Selection tool
and the Shape Builder used to keep the old value when a switch was not
true or false, a color could not be read or a width or gap length was
not a number, and it set the other values sent with it. It also took
the RGB of a color with an alpha part, and the Shape Builder took any
`pickColorFrom` other than `swatches` as `artwork` and any `selection`
other than `straightLine` as `freeform`.

The command now checks every value before it sets any, whether the tool
is chosen or not: a switch must be true or false, a highlight color
must be an RGB color or a layer color's name without an alpha part, a
width or gap length must be a number, `pickColorFrom` and `selection`
must be one of their names, and an option the tool does not have is an
error. The error names the option, and nothing is set or saved. A width
outside 1 to 20 and a gap length outside 0 to 72 are still clamped, and
saved settings with an invalid value still load.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-13 11:34:44 -08:00
BFlat a8db64db47 Merge pull request #7208 from dotCooCoo/feat/live-paint-selection-cursors
Live Paint Selection: cursor shows a face, an edge or nothing to select
2026-11-14 01:54:04 +07:00
BFlat 1c1bb2f96e Merge pull request #7191 from dotCooCoo/feat/gradient-hue-blend
Gradients: Hue Clockwise and Hue Counterclockwise mix stops around the hue wheel
2026-11-14 01:53:39 +07:00
BFlat 2370ad1b21 Merge pull request #7200 from dotCooCoo/fix/free-distort-constrain
Free Transform: Constrain keeps a Free Distort corner on its diagonal
2026-11-14 01:53:20 +07:00
dotCooCoo d1f76ede8a Smooth: a drag along a segment smooths it when its anchors are out of reach
A Smooth drag along the middle of a curved segment smoothed nothing when
neither of the segment's anchors was within the reach, and paths of two
anchors were never smoothed.

- path.smoothRegion searches each curved segment where it can come
  within the reach, halving it down to pieces no longer than half the
  reach, and adds an anchor in the middle of each stretch in reach; the
  existing reach split then cuts the segment where the drag enters and
  leaves the reach. A drag that only grazes a curve finds the place on
  it nearest the drag. The search is bounded per drag and shared
  equally by the segments in reach.
- Paths of two anchors are smoothed, open or closed.
- Alt with the Paintbrush smooths a selected two-anchor curve; a
  two-anchor straight line still gets the closed stroke. Both sides use
  one segment_is_straight test.

Part of #2224
2026-11-13 10:44:19 -08:00
dotCooCoo e25795f73e Path Precision Tools: Trim at Crossings leaves clipping paths and art outside isolation alone
- The clipping path of a clip group or a clipped layer takes no part,
  the members of a compound clipping path included. Before, only a
  plain clipping path was left out.
- In isolation mode only paths inside the isolated object are trimmed;
  paths outside it still count as crossing.
- A rectangle or line that reaches so many paths that comparing their
  boxes would take more than 50,000,000 tests is refused before any
  work starts.
- A tool drag that goes 3 screen pixels or more from the press stays a
  rectangle or line when it ends near the press. Before, it ran as a
  click and could remove a whole path the final rectangle did not
  touch.

Docs: docs/mcp.md.
2026-11-13 10:44:07 -08:00
dotCooCoo 9a4e3e6202 Smooth tool: the drag shows the band the tool smooths
While the Smooth tool drags with a path selected that it can smooth, a
dashed outline shows the band its release smooths: every point within
the tool's radius (12 screen pixels) of the drag, round at both ends.
Alt smoothing with the Pencil, Paintbrush and Blob Brush shows the same
band. A selection with no path the tool can change shows none.

- The band is kept in squares eight radii wide, and each step of the
  drag adds its area only to the squares it reaches. A piece of a
  square's outline along a side is left out only where the square
  across holds band area.
- A drag segment too long for the squares (a jump drawn zoomed out and
  viewed zoomed in) keeps its band near each end in the squares and
  shows the rest as the two sides of its band. A step that cannot be
  added whole is added one segment at a time.
- A coarser grid of cells lists the squares and long segments, so a new
  one is checked only against those near it, and an outline is made
  again only where the band near it changed.
- After a zoom change mid-drag the band is outlined again a few hundred
  points per frame, and the work on long segments stops for the frame
  after a fixed budget. Tools report unfinished overlays with
  Tool::overlays_pending, and the canvas then draws again on the next
  frame, so the band covers the whole drag even while the pointer holds
  still.
2026-11-13 10:41:00 -08:00