Commit Graph
228 Commits
Author SHA1 Message Date
dotCooCoo c5a98e19f0 Tools: restored Spiral, Rectangular Grid and Polar Grid counts keep the current value
A saved preferences file is restored onto the drawing tools without the
option check that tool.setOption applies. A Spiral segment count or a
grid divider count that was not a whole number (a string, a fraction, a
negative, null) reset the tool to 10 or 5 instead of keeping its
current count. The Arc tool's base axis took any string other than y as
x. Each now keeps its current value for such a value, and a whole
number keeps its existing range.

While a shape is dragged out, an ignored count or axis no longer
replaces the drag's starting value, so Escape puts back the values the
drag started with.
2026-11-21 00:52:40 -08:00
BFlat 43e0407cd0 Merge pull request #8891 from dotCooCoo/fix/eraser-drag-midpoint-tip
Eraser: a drag's outline takes the tip halfway along each step in two more cases
2026-11-21 10:36:19 +07:00
dotCooCoo f88a6b5877 Eraser: a drag's outline takes the tip halfway along each step in two more cases
The outline of an Eraser drag takes, at each step, the tip the pen gives
halfway along it, as path.eraseRegion erases. Two cases still used the
tips at the step's ends:

- A round tip whose Size follows the pen drew each step as wide as the
  mean of the tips at its ends. Where an end is held at the 0.1 pt least
  size, that mean differs from the tip halfway along: with Size 10 pt on
  Pressure by 20 pt, a step from no pressure to full pressure showed
  15.05 pt wide where the release erases 10 pt.
- A pen turned or tilted in place at the last point updated the last
  step only when the tip at that point changed. With Size 10 pt on Tilt
  by 20 pt, tilting from 80 to 85 degrees after an upright point keeps
  the end tip at 0.1 pt while the tip halfway along goes from 12.22 pt to
  11.11 pt, and the outline kept the old one. The area outline now keeps
  and compares the tip halfway along the last step.
2026-11-20 15:47:54 -08:00
dotCooCoo 90130f37ed Shape tools: the Smart Guide label of a hover goes when the pointer leaves the canvas
With Smart Guides on, hovering a shape tool over another object's anchor
or edge shows the "anchor" or "path" label where the new shape would
start. When the pointer then left the canvas, went under a panel or
menu, or a middle-button drag started panning, the label stayed on the
canvas at the last hover point. The Rectangle, Rounded Rectangle,
Ellipse, Polygon, Star and Line Segment tools now drop it when their
hover ends, and so do the Arc, Spiral, Rectangular Grid and Polar Grid
tools, as the Scissors tool already does.
2026-11-19 20:55:39 -08:00
yoriswind 36bde202eb Scissors: preview the actual cut point
Show the native point marker at the existing cut target, respecting consumer endpoint eligibility/canonicalization and current snapping/selection. Keep cut commands unchanged.

Closes #8655.
2026-11-19 20:00:59 +00:00
BFlat 3f0707e64f Merge pull request #7103 from dotCooCoo/feat/stylus-wheel
Brushes: an airbrush pen's stylus wheel varies brush size and width
2026-11-19 14:46:40 +07:00
yoriswind 0471818814 Merge current main while preserving PR #6713 2026-11-19 06:32:22 +00:00
dotCooCoo 00f9a9c205 Brushes: main's eraser and bristle tip tests take the stylus wheel
The Bristle tip outline reads the five pen controls and leaves the
wheel unused. The bristle tip test's pen pose gives no wheel, and the
eraser test's mode error lists `stylusWheel`.
2026-11-18 17:44:35 -08:00
dotCooCoo 4080708714 Merge main into feat/stylus-wheel 2026-11-18 17:25:37 -08:00
bflatastic f79889da55 Merge main into #8517 2026-11-19 01:21:06 +07:00
BFlat a0bc3a7900 Merge pull request #8500 from dotCooCoo/feat/bristle-pen-cursor
Paintbrush: preview Bristle tip for rotation-capable pens
2026-11-19 00:43:00 +07:00
dotCooCoo 18c4a7b965 Merge main into feat/stylus-wheel 2026-11-18 07:27:22 -08:00
dotCooCoo 095897d658 Merge main into feat/anchor-point-alt-link-handles 2026-11-18 06:26:39 -08:00
BFlat 0c7b92730b Merge pull request #8467 from dotCooCoo/perf/direct-blend-spine-guard
Direct Selection: the selected blend spine check returns at once when no blend is selected
2026-11-18 13:14:15 +07:00
BFlat e8b507aaee Merge pull request #7366 from dotCooCoo/fix/tool-set-option-errors
Tools: setting a tool option with a bad value returns an error
2026-11-18 12:58:18 +07:00
dotCooCoo 7973b6254c Keep precise-cursor regression meaningful 2026-11-17 20:53:26 -08:00
dotCooCoo 4c3c4adee7 Anchor Point: Alt-drag on a handle links it with the opposite handle
With the Anchor Point tool chosen, dragging a direction handle with Alt
held now links it with the opposite handle and makes the anchor smooth,
on paths and on a selected blend's spine. A drag without Alt still moves
one handle on its own, an Alt-click still retracts the handle, and the
Pen with Alt keeps moving a handle on its own.

- path.setHandle and object.blend.spine.moveAnchor take link: the other
  handle turns in line at its own length; a retracted one is pulled out
  to the dragged handle's length where a segment leaves the anchor on
  its side, and stays retracted at an open end. A request that changes
  nothing records no undo step; link with independent, a non-boolean
  link and, for the spine, link without handle are refused.
- Anchor::set_handle measures long handles without overflowing, so
  turning a very long handle no longer writes NaN or infinite points.
- The two new error messages have rows in the message catalogs.

Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md.
2026-11-17 18:52:29 -08:00
dotCooCoo 18cf1d7a93 Hide Bristle tip after post-commit selection 2026-11-17 18:13:58 -08:00
dotCooCoo 0637f14bfd Keep Bristle tip in sync with Alt release 2026-11-17 18:01:35 -08:00
dotCooCoo 375b2a23e1 Preview Bristle brush tip for rotation-capable pens 2026-11-17 17:14:05 -08:00
dotCooCoo a411d285d4 Direct Selection: the selected blend spine check returns at once when no blend is selected
The checks that look only at selected blends' spines (Direct Selection's
hover, press and marquee, the Anchor Point tool's press and handles, and
the Pen's click on a spine) walked the whole document and built every
blend's spine before keeping the selected ones. They now go through
direct::selected_spines, which returns an empty list when no selected
object is a blend and otherwise keeps the same order and filter. The
check that finds a point on any blend's spine is unchanged.

On 20,000 paths and 200 blends, 500 checks with one plain path selected
took 24 us instead of 336 ms; with one blend selected the time is the
same. Results are compared against the old filter in the tests.
2026-11-17 14:27:34 -08:00
dotCooCoo 09b7f6c3ce Merge main into feat/stylus-wheel 2026-11-17 12:36:31 -08:00
yoriswind 49955611f4 6470: align Scissors guide fixture with Smart Guides options 2026-11-17 11:27:22 -08:00
dotCooCoo 22d44c6fae Tools: the Spiral and Arc tools refuse the values they would keep as others
The Spiral tool's option check took a decay up to 150 while the tool keeps
at most 99.99, so `tool.setOption` reported success with another value. It
now takes 5 to 99.99. The Arc tool's lengths are checked from 1e-9 to 1e6,
the lengths it keeps. The Spiral dialog sends a typed decay past 99.99 as
99.99, the decay the spiral was already drawn with.

The Arc dialog test now expects OK to refuse a slope outside -100 to 100
and a Base Along other than X or Y, leaving the dialog open and the options
unchanged. The Slope field and its slider keep a typed value within that
range.
2026-11-17 08:55:24 -08:00
yoriswind 676a8589b4 Format Scissors pixel option repair 2026-11-17 08:31:11 -08:00
yoriswind c4e36de0f0 Use Drawing pixel snapping options consistently for Scissors 2026-11-17 08:28:44 -08:00
yoriswind bdae835305 Merge current main before Scissors full local CI 2026-11-17 08:11:36 -08:00
dotCooCoo 14d814b9f0 Merge main into feat/stylus-wheel 2026-11-17 03:57:49 -08:00
dotCooCoo a8b658a33e Merge main into fix/tool-set-option-errors 2026-11-16 20:33:41 -08:00
dotCooCoo 642d95ab4a Spiral: dragging turns the spiral to the pointer, and the click dialog starts it along Constrain Angle
A spiral dragged out with the Spiral tool now turns about its center so
that its outer end is at the pointer, so dragging around the center turns
it. A pointer within 0.01 pt of the center keeps the last direction. Alt,
Ctrl/Cmd, Up/Down, Space and Escape work as before, and Shift does not
change the direction.

With General > Constrain Angle other than 0 degrees or a whole turn, a
spiral placed from the Spiral dialog starts along the turned x axis, with
its bounding box turned.

shape.spiral takes an optional rotation (degrees clockwise about cx, cy).
Without it, or at 0 or a whole turn, spirals are drawn as before; a
rotation that is not a number is an error and adds nothing.
2026-11-16 03:20:19 -08:00
dotCooCoo e0f880ab1a Arc: arcs follow the axes General › Constrain Angle turns
With a Constrain Angle other than 0° or a whole turn, an arc dragged out
with the Arc tool or placed from the Arc Segment Tool Options click dialog
is drawn along the turned x and y axes, with its bounding box turned. The
drag's box and Shift's equal lengths are measured along those axes, the
reference point stays at the drag's corner or the click, and F, C and
Up/Down keep the turn. At 0° and whole turns arcs are drawn as before.

shape.arc takes an optional rotation (degrees clockwise, about x1, y1 or
about the reference point x, y); a rotation that is not a number is an
error and adds nothing.
2026-11-15 23:50:29 -08:00
dotCooCoo 033b494836 Merge main into feat/stylus-wheel 2026-11-15 20:46:32 -08:00
dotCooCoo 144aec7dfc Merge main into fix/tool-set-option-errors 2026-11-15 20:22:03 -08:00
dotCooCoo 139b700334 Merge main into feat/stylus-wheel 2026-11-15 19:38:10 -08:00
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
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 d66a84b4f6 Merge main into feat/stylus-wheel 2026-11-15 16:10:22 -08:00
dotCooCoo 9eb6a0fc48 Merge main into feat/eraser-shift-line 2026-11-15 16:07:54 -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 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
dotCooCoo 501567a704 Merge main into fix/tool-set-option-errors 2026-11-15 13:58:40 -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 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 b1f9081feb Tools: the Arc tool keeps its lengths at most 1e6 pt, as tool.setOption takes them
The Arc tool's setter took a length of any size, while its option check
takes a number above 0 and at most 1e6, so a length set past 1e6 was
reported back and then refused. The setter now keeps a length within
that range.

The catalog test also checks what each tool reports after a number
option is set past either end and after a true-or-false option is
flipped. docs/mcp.md gives the range tool.setOption takes for the
Eraser's sizeVariation (0 to 1000).
2026-11-15 11:57:06 -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 23bdbada81 Tools: tool.setOption takes the Eraser's angle and roundness modes and variations
The Eraser reports angleMode, roundnessMode, angleVariation and
roundnessVariation, but the check before tool.setOption sent every key
it did not list to the true-or-false check, so the Freehand dialog's OK
for the Eraser failed. sizeMode was also limited to fixed and pressure
for the Eraser, which takes every mode.

The gesture tools' check now takes each mode (any of the six for the
Eraser, fixed or pressure for the Blob Brush's size), the angle
variation from 0 to 180 and the roundness variation from 0 to 100, and
names its true-or-false options instead of defaulting to them. A new
test checks that every tool in the catalog takes back the options it
reports, apart from the state it reports and does not take.
2026-11-15 11:22:47 -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
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