Commit Graph
1705 Commits
Author SHA1 Message Date
.CooCoo 5a435b222e Merge pull request #10769 from dotCooCoo/fix/unfilled-shapes-marquee-default
Selection: a click inside an unfilled shape starts a marquee again, with selecting inside as an option
2026-12-04 09:24:47 -08:00
.CooCoo ddff0adfbf Merge pull request #10747 from dotCooCoo/feat/live-star-points
Shapes: stars stay live with an editable point count
2026-12-04 08:12:18 -08:00
dotCooCoo 69eae94826 Shapes: a star's stored settings read back with up to 2000 corners
A star with a radius on each corner stores its corner list in its
shape settings entry. A 1000-point star's entry is longer than the
4,096-byte read limit, so it was dropped on read and the star lost its
pie angles and arc mode on the next edit. The limit is now 128 KiB,
which holds the longest entry a 1000-point star can write.
2026-12-04 06:44:59 -08:00
dotCooCoo 177d0c6700 Shapes: a whole star stays live whatever its pie angles hold
A whole star draws every point, so its pie angles no longer stop it
from being stored as a live star. Angles configured on any whole shape
are stored with it, so a later arc mode change uses them.

A corner list longer than the old corner count drops its entries past
the last corner before it is spread, so the corners a new point or
side count adds are sharp and keep the default kind.
2026-12-04 05:56:09 -08:00
.CooCoo 3613c7f657 Merge pull request #10781 from dotCooCoo/fix/direct-select-ctrl-handle-mirror
Direct Selection: Ctrl held before pressing a handle mirrors the opposite handle
2026-12-04 01:17:57 -08:00
dotCooCoo b3f5c22633 Shapes: a live star keeps a small ratio and its corners through edits
A live star whose ratio is below 0.01, which object.setLiveShape takes,
lost its inner radius and its live shape when addon.shapes.configure
changed another value: the stored ratio was clamped to 0.01 when the
star was drawn and no longer counted as live. Any ratio from 0 to 1 now
draws and stays live as it is.

A corner list shorter than the star's or polygon's corners counted as
one shared radius, so a new point or side count gave the missing corners
the first corner's radius. The missing corners now stay sharp.

A ratio that changes which corners a rounded star cuts is now an error
with radius or kind in the same call, as points is, since the corners
selected before it no longer name the same corners. The anchor selection
is dropped by the same check.
2026-12-04 01:01:51 -08:00
dotCooCoo 472d7f8e69 Direct Selection: picked handles stay picked after a Cmd/Ctrl+Shift drag
With two direction handles picked, a Cmd/Ctrl+Shift press on one of them
drags that handle alone with its opposite handle mirrored and its angle
constrained. Shift kept the press from counting as a press on one of
several picked handles, so the press did not record the picks, and its
release after a drag, or Escape during it, left only the pressed handle.

The press now records the picks for any mirroring press on one of several
picked handles, with or without Shift. Shift still keeps a drag from
moving every picked handle, and a Shift-click still adds or removes the
pressed handle.
2026-12-03 22:29:17 -08:00
dotCooCoo 74b2ffdb82 Direct Selection: picked handles stay picked after a Cmd/Ctrl drag
A Cmd/Ctrl press on one of several picked direction handles drags that
handle alone so its opposite handle mirrors. The press cleared the picked
handles, and neither the release nor Escape restored them, so after the
drag only the pressed handle could be picked again.

The press now records that it is such a mirroring press. Its release
after a drag, and Escape during the drag, restore the handles that were
picked when the press began. A drag without Cmd/Ctrl still moves every
picked handle, and a click still picks the pressed handle alone.
2026-12-03 21:26:45 -08:00
dotCooCoo b44dbefe12 Direct Selection: a Cmd/Ctrl drag of one of several picked handles mirrors
With two or more direction handles picked, a press without Shift on one
of them started a drag of all the picked handles (path.moveHandles),
which never mirrors. A Cmd/Ctrl press that Direct Selection now keeps on
a shown handle therefore translated every picked handle instead of
mirroring the opposite one.

press_handle now drags the pressed handle alone when the press mirrors
(Cmd/Ctrl without Alt, and not the press that lent the tool from another
tool), so the drag mirrors its opposite handle and the other picked
handles stay where they are. A drag without Cmd/Ctrl still moves every
picked handle.
2026-12-03 12:59:09 -08:00
dotCooCoo 48ef8740e9 Direct Selection: Ctrl held before pressing a handle mirrors the opposite handle
With Direct Selection chosen, Cmd/Ctrl lends the Selection tool for the
press. That loan also took presses on the end of a shown direction handle,
so a Ctrl-drag on a handle moved the whole object (and anything selected
with it), or drew a marquee where no object was under the handle. Only Ctrl
added after the drag began mirrored the opposite handle.

A new Tool::keeps_cmd_press lets the active tool keep a Cmd/Ctrl press.
Direct Selection keeps one without Alt on the end of a shown handle of a
path, of type on a path, or of a selected blend spine anchor, so the drag
mirrors the opposite handle, with Shift constraining it. The session's
lent_tool_at asks it, so the press, the cursor and the status bar agree. A
press elsewhere, on a handle of the bounding box the lent Selection tool
shows, or with Cmd+Alt (Group Selection) is still lent as before.

docs/gaps.md and docs/ui-parity.md describe the press.
2026-12-03 11:33:13 -08:00
dotCooCoo 82fc8b1e5d Selection: Select Behind rechecks when Select Inside Unfilled Shapes changes
The Selection tool keeps the answer of its last Select Behind hit test
for the same point. The key it is stored under did not include whether
unfilled interiors are hit, so after the preference was turned on or
off, a Cmd/Ctrl-click at the same point could use the old answer. The
key now includes it.
2026-12-03 11:02:52 -08:00
dotCooCoo f7ec5d50cc Selection: a click inside an unfilled shape starts a marquee again
#9807 made the Selection, Direct Selection and Group Selection tools,
Object Highlighting and a right-click's selection pick a closed path
with no fill by a click inside it (#9175). That is now an option:
Preferences > Selection & Anchor Display > Select Inside Unfilled
Shapes (`selectInsideUnfilledShapes`), off by default. With it off, a
click or drag inside an unfilled shape that hits nothing else there
starts a marquee, as it did before #9807. With it on, the tools behave
as #9807 made them. Object Selection by Path Only still turns the
inside off either way.

Tests that asserted the #9807 default now turn the preference on before
expecting the inside to select the shape, and also check that it
selects nothing by default: the MCP test (renamed to
a_click_inside_an_unfilled_shape_selects_it_only_with_the_preference),
the outside-stroke reach test and the Direct Selection center point
test. A new Selection tool test checks that a drag inside an unfilled
rectangle makes a marquee and leaves it in place by default, and moves
it with the preference on.
2026-12-03 10:56:46 -08:00
dotCooCoo 9c11c47f75 Doc tests: unsafe code is denied in doc tests too
Rustdoc builds each doc test as its own crate, without the workspace's
`unsafe_code = "deny"` and without a library's `#![forbid(unsafe_code)]`,
so a doc test holding an `unsafe` block passed `cargo test --doc`.

- Every library root now carries `#![doc(test(attr(forbid(unsafe_code))))]`,
  or `deny` in cad, eps and metafile, which rely on the workspace lint.
- `cargo xtask layers` reports a library whose doc tests are missing the
  attribute, or use `deny` where the library forbids unsafe code.
- AGENTS.md names the rule next to the `unsafe` allowlist.
2026-12-03 09:51:28 -08:00
dotCooCoo 7e918324db Shapes: a file's polygon side or star point count is kept to 1000
A shape's stored add-on settings read their side or point count from the
file with no upper bound, and a live star or polygon made from them took
that count as it was, so a document could ask for billions of points.
The count is now clamped to 2-1000 when it is read, as the Polygon and
Star tools clamp it, the live polygon and star made from it are kept to
3-1000 sides and 2-1000 points, and shapes::star keeps to 1000 points.
2026-12-03 09:25:04 -08:00
dotCooCoo 5aadf6c616 Shapes: stars stay live with an editable point count
A star drawn with the Star tool, shape.star or addon.shapes.star was a
plain path, so its point count could not change after it was drawn.

- LiveShape::Star keeps the outer and inner radii, the point count
  (2 to 1000, clamped when read from a file) and Live Corners' radii and
  kinds. Its corners keep the radius they shared through a new count.
- object.setLiveShape takes `points` (2 to 1000) and `ratio` (inner
  radius over outer radius, above 0 and up to 1), one undo step each and
  none when nothing changes. A new layout drops the star's selected
  anchors and segments; `points` with `radius` or `kind` is an error.
- The side widget shows on a live star and sets 3 to 20 points.
- Star Properties in the Transform panel and the Properties panel's
  Transform section have a Points field with a 3 to 20 slider and a
  Ratio field.
- Shape Tools' configure keeps a whole star live.

Fixes #4339
2026-12-03 08:54:44 -08:00
.CooCoo 802a869c68 Merge pull request #10517 from dotCooCoo/fix/test-pass-remaining-crates
Tests: assert list lengths and saved names in tool, path, 3D, brush and CAD tests
2026-12-01 19:28:41 -08:00
dotCooCoo 52d08f0f9c Tests: SVG, PDF and EPS tests check what they claim
Assertions that ran all() over a list that could be empty now check the
list's length first: mesh points, image inks, glyph origins, imported
text, the PDF mesh and arrowhead paths, and the resampled CMYK pixels.
An image that takes a Warp from its art style is checked to keep none of
the look's fills and strokes, instead of checking each of none.

The convolve-matrix tests check that the filtered rectangle is imported,
not only that the import returned Ok. The fan-out clip path test moves
to a unit test that counts the clip paths read. The self-nesting symbol
test checks that the other symbol comes back. The EPS level and preview
id test checks the param values and the trimming and case rules instead
of looping over every value. The ignored PDF text-heavy timing run says
why it is ignored.

A gradient that repeats or reflects with no stops now paints as one
that pads. Before, PDF export wrote it as two 160 by 160 images and EPS
wrote three runs of a conic where one that pads writes one;
`Gradient::is_spread` is false without stops. `paint.setFill`'s params
still report the spread.
2026-12-01 17:38:19 -08:00
dotCooCoo ccf5765419 Tests: assert counts and saved names in tool, path, 3D, brush and CAD tests
Tests whose all() passed on an empty list now check the list's length or
that it is not empty:
- huge_circles_bridge_with_finite_anchors_or_are_refused (pathops bridge)
- smooth_rounds_corners (pathops ops): the four corners stay, smoothed
- a_held_rotation_turns_the_art_around_its_pin (tools ARAP): one point
  per mesh vertex
- the_eraser_drag_area_matches_the_release_when_pressure_or_a_mode_starts_during_the_drag
  (tools gesture): one released point per press
- every_effect_casts_a_shadow, inflate_cells_across_a_hole_edge_are_cut_to_the_shape,
  a_plane_has_only_a_front_and_a_hollow_solid_none and
  perspective_runs_0_to_160_degrees_with_the_eye_outside_the_object (three-d)
- a_file_two_branches_include_is_followed_from_the_shallower_one
  (scriptcheck): one row per include line
- pens_pick_colors_and_widths (cad HP-GL): four widths
- junk_pressure_brushes_draw_finite_art (brush): all 12 cases draw

Round trips that hold by construction (parse finds the id in ALL) are
replaced with one saved name that must parse and one that must not:
follow_names_parse (pathops shared edge), the shape kinds (pathops
shapes), surfaces_parse_from_their_ids (three-d), the Quick Pen actions
(tools), names_parse_and_serialize_as_names (plugins) and the brush
variation modes, which also compare the serde names with the ids.

crop_keeps_an_instance_whose_art_reaches_the_region (cad) names the
entities written instead of checking that some were.
the_saved_engine_preference_is_found (app) pins the GPU choices the
preferences offer to the three the app reads.
timing_unite_1000_circles (pathops) gets an ignore reason and checks
that Unite gives one shape.

Each changed assertion fails when the code under test is broken (an id
renamed, a list emptied, a flush or instance dropped) and passes when it
is restored.
2026-12-01 17:35:21 -08:00
.CooCoo 4596f1a8be Merge pull request #10374 from dotCooCoo/fix/swallowed-regression-guards
Tests: guards check the environment, not the output under test
2026-12-01 14:10:23 -08:00
dotCooCoo 8f5eb5435f Tests: assert exact columns, padding and corner span in js and tools tests
Five assertions accepted any positive value, so a wrong result could pass:

- host_tests: the evaluator site column and the thrown error's column are
  now 3, where the indented call and throw start.
- promise_tests: rejections relayed through Promise.all, Promise.race and
  a catch handler report column 3, not any column above 0.
- xmp_tests: the sample packet's padding is exactly 1.
- corners tests: a 10 pt radius at a 120 degree polygon corner spans
  10 pt, within 1e-6, instead of anything in (5, 10.5].
2026-12-01 02:13:46 -08:00
dotCooCoo 1dbbf87436 Tests: guards check the environment, not the output under test
Several tests returned early when the code under test gave back nothing,
so the regression they guard against passed. Each of those guards now
checks only what the host provides (an installed face, the bundled
fonts), and the output itself is asserted:

- PDF live text: the lam-alef face is no longer picked by whether its
  type imports (#6072); Insert Kashidas asserts the kashida and the
  imported type.
- Effects and Expand Appearance on type assert the outlines and the
  drawn type when the default face is installed.
- The OpenType panel's Stylistic Sets test asserts sets with the
  bundled fonts.
- Thumbnail worker tests assert that the worker starts; the memory
  peak test asserts a reading.
- The json2 test checks the interpreter's Date, replace and RegExp on
  every run, before looking for json2.js.
- Devanagari arrow keys and the Arabic narrow-area wrap assert the
  layout they set up.
2026-11-30 21:56:24 -08:00
.CooCoo b8470d947f Merge pull request #5272 from ljkx/fine-nudge-5258
Nudge: Ctrl/Cmd+arrow moves by a tenth of the keyboard increment (#5258)
2026-11-30 15:27:20 -08:00
.CooCoo c0b1a485cc Merge pull request #10285 from dotCooCoo/fix/dimension-alt-measure-outside-stroke
Dimension: Alt whole-path measure takes the outside of the stroke with Use Preview Bounds off too
2026-11-30 13:50:26 -08:00
.CooCoo 89a244acbf Merge pull request #10270 from dotCooCoo/fix/curvature-stretch-narrows
Fix #6192: Curvature, a point dragged far out narrows toward it
2026-11-30 10:44:33 -08:00
dotCooCoo 4f5371fb3a Merge main into fix/dimension-alt-measure-outside-stroke 2026-11-30 08:09:18 -08:00
dotCooCoo aa3415aa5e Dimension: the Alt hover box is described as reaching the outside of the stroke
The parity doc, docs/dimensions.md and two comments said the box shown
while hovering a path with Alt held goes through the path's outermost
points. It follows the box the strokes paint, which reaches 0.5 pt past
those points for a centered 1 pt stroke.
2026-11-30 08:09:18 -08:00
ljkxandClaude Opus 5.5 35eae6a235 Merge remote-tracking branch 'origin/main' into fine-nudge-5258
# Conflicts:
#	docs/ui-parity.md

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 17:00:35 +01:00
.CooCoo 44e57e37d7 Merge pull request #10169 from dotCooCoo/fix/shape-builder-fill
Shape Builder: Pick Color From defaults to Color Swatches, so a picked fill fills the merge
2026-11-30 07:53:27 -08:00
dotCooCoo 7310a8eb4f Dimension: Alt whole-path measure takes the outside of the stroke with Use Preview Bounds off too
With Alt held, the Dimension tool's box over a path and the dimension of
the whole path it places now reach the outside of the path's strokes
whether Use Preview Bounds is on or off. Before, they did so only with
Use Preview Bounds on, and with it off they went through the outermost
points of the path.

Every dimension of a whole path the tool places now records
`"preview": true` in its extent source. Dimensions saved without it keep
measuring between the outermost points, and `dimension.create` still
defaults `preview` to false.
2026-11-30 07:49:50 -08:00
dotCooCoo 1cb4193974 Fix #6192: Curvature, a point dragged far out narrows toward it
Dragging a point of a selected path with the Curvature tool gave the
point the handles of the circle through it and its neighbors, while the
neighbors kept their own tangents. Stretching a circle's top point far up
made those handles reach well past the circle's sides, so the shape swung
out wider than the circle before it narrowed toward the point.

Each handle of the moved point is now no longer than the handle of the
circular arc tangent to it and to the neighbor's handle on that segment.
Where the neighbor is on the circle the tool follows, that arc is the
circle and the handles do not change. The shortening fades out as the
two handle lines meet near the neighbor or turn parallel, so the handles
change continuously during a drag.
2026-11-30 06:48:25 -08:00
Codex 98026915ab Check the Selection move pointer over source art and document the centre-point modifier 2026-11-30 15:26:38 +01:00
Codex 99a5b6cdc4 Describe the selected-art pointer in the cursor reference 2026-11-30 14:54:47 +01:00
ljkxandClaude Opus 5.5 397cb9a472 Merge remote-tracking branch 'origin/main' into fine-nudge-5258
# Conflicts:
#	crates/engine/src/cmd/object/commands.rs
#	docs/ui-parity.md

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 13:58:07 +01:00
Codex 8df3fd17ac Restore white artboards in Outline and the selection arrow over selected art 2026-11-30 13:53:24 +01:00
dotCooCoo 2be42e7986 Shape Builder: saved Artwork from earlier versions switches to Color Swatches once
Leaving the Shape Builder saved every one of its options, so preferences
from earlier versions hold pickColorFrom "artwork" whether or not it was
picked, and kept the old default after Color Swatches became the default.

The preferences now carry toolSettingsVersion, written as 1 once a tool
setting is stored. Applying preferences without it changes a saved
Shape Builder pickColorFrom "artwork" to "swatches" and writes the
version, so Artwork picked after that is kept at the next launch. A
saved "swatches" and preferences without a saved pickColorFrom are
unchanged.

Docs: docs/mcp.md and the tool options params text.
2026-11-29 19:52:59 -08:00
dotCooCoo 8e68c5edcf Shape Builder: Pick Color From defaults to Color Swatches
While the Shape Builder is active, a fill picked from a swatch or a color
changes only the current fill, and the selected art keeps its own. With
Pick Color From set to Artwork, a merge takes the look of the art, so the
picked color never reached the merged shape and the tool looked as if it
could not fill.

Pick Color From now defaults to Color Swatches: a merge fills with the
picked color, and the Left and Right arrow keys step through the color
swatches. A pickColorFrom saved with the preferences is kept, so a saved
Artwork stays Artwork; preferences saved without one take Color Swatches.
The shapeBuilder.merge command still defaults to artwork when its
pickColorFrom is left out.

Docs: docs/mcp.md and the tool options params text.
2026-11-29 17:43:37 -08:00
dotCooCoo 3617039ef5 Global Edit: the canvas shares the kept outlines instead of copying them each frame
With one object selected and the Selection tool active, or while Global
Edit is on, every frame copied each highlighted outline out of the kept
list and made one overlay per object, which the canvas flattened and
stroked again. With 10,000 matching objects that was most of a 27 ms
frame.

highlights and similar now return the kept outlines as a shared
Highlights, grouped by layer color with a revision that changes only when
the outlines are found again. The session sends one Overlay::Outlines per
color, and the canvas shows it as a SelectionOutline keyed by that
revision, so the lines are stroked again only when the outlines or the
view change.
2026-11-29 11:36:48 -08:00
dotCooCoo 3b119db0d4 Merge main into fix/craft-libs-869c970 2026-11-28 22:31:06 -08:00
HassanKhan 78795e188b Merge remote-tracking branch 'upstream/main' into fix-8531-snap-budget-edges
# Conflicts:
#	docs/roadmap.md
#	docs/target-app-parity.md
#	docs/ui-parity.md
2026-11-29 10:20:07 +05:00
dotCooCoo 05173a936f Merge main into fix/craft-libs-8bea600 2026-11-28 20:49:41 -08:00
.CooCoo 70e3cc7e02 Merge pull request #8824 from dotCooCoo/fix/issue-1232
Live Corners: pick any corner widget with Direct Selection
2026-11-28 20:05:41 -08:00
dotCooCoo 87456c5b35 Merge main into fix/issue-1232 2026-11-28 20:00:34 -08:00
dotCooCoo ea69457f1a Merge main into fix/craft-libs-07a8c47 2026-11-28 19:36:20 -08:00
dotCooCoo 6d3680e554 Smart Guides: split the scale snap's edge helpers out of snap_scale_edges
The function stays under Clippy's cognitive complexity limit.
2026-11-28 17:58:23 -08:00
dotCooCoo 25ba33c7e6 Merge main into fix/craft-libs-f762f98 2026-11-28 17:53:05 -08:00
dotCooCoo a0d26d1593 Merge main into fix/scale-snap-geometric-bounds 2026-11-28 17:32:20 -08:00
dotCooCoo 4ceaee694a Smart Guides: a scale lines up geometric edges with Use Preview Bounds on
With Use Preview Bounds on, dragging a bounding-box handle with the
Selection tool, a shape tool or Free Transform lined up the outside of
the selection's stroke with the other art's geometric bounds, which
Smart Guides use for the targets. A stroked object then stopped half a
stroke short of the edge it showed a guide for, the same mismatch moves
had before.

- The handle still drags the visual box, and the edges of the
  selection's geometric bounds line up with the targets and with even
  spacing. The margins between the two boxes keep their size unless
  Scale Strokes & Effects is on, when they scale with the box. Snap to
  Grid and Snap to Pixel still use the bounds the box shows, and the
  Slice Selection tool is unchanged.
- Tool contexts carry the Scale Strokes & Effects preference.
- New tests drag the right-middle handle of a rectangle with a 20 pt
  stroke toward another rectangle with the Selection tool and with Free
  Transform.

Part of #6436
2026-11-28 17:32:11 -08:00
.CooCoo 75e639a024 Merge pull request #9915 from dotCooCoo/feat/arc-join-path-end
Three-Point Arc: join arcs to open path ends and snap to carry a path on
2026-11-28 17:28:46 -08:00
dotCooCoo 9ed5e06ff3 Dependencies: craft-libs f762f98a, with the status-bar zoom look and the compass clear of the scroll bars
- Every craft-libs crate moves from 610c86792a to f762f98a (craft-libs
  main), which adds the fixed corner-widget inset, the ruler corner's
  plus, popover padding, and a native window's move recorded once.
- The status bar's Zoom field uses ZoomField::status_bar, so it draws
  without an outline in the status bar's look.
- The Rotate View compass is placed in CanvasScrollbars::clear_of
  instead of a copy of the scroll bars' sizes.
- The tools' corner-widget inset is public, and a test holds it equal
  to CornerWidgets::INSET, the inset the canvas draws the widgets at.
2026-11-28 17:12:28 -08:00
.CooCoo 0aacac4bf2 Merge pull request #9944 from dotCooCoo/train/carry9162
Anchor Point: Shift keeps handles pulled out of an anchor at 45° steps
2026-11-28 13:37:55 -08:00