Commit Graph
540 Commits
Author SHA1 Message Date
dotCooCoo ef6d14dc22 Dimension tool: both ends of a dimension follow the art it measures
A linear dimension clicked from an anchor to a point that is not an
anchor (a point on a segment, or a point a Smart Guide gave) followed
the art at the anchor end only, so scaling the art turned it into a
long slanted dimension.

- A point on a segment is stored by its curve parameter on that
  segment, and stays on it when the segment's anchors or handles are
  edited.
- Any other point is stored against anchors (and, for a path whose
  anchors lie on one line, handles) of the path under it, or of the
  path at the other end, and moves, scales, turns and reflects with
  that path. Beside a path whose anchors and handles all lie on one
  line, such as a straight line, it keeps its distance along and
  across the path: a reflection moves it as a half turn does, and a
  scale that is not uniform moves it as a uniform scale does.
- When linked art is reflected, a linear dimension's line goes to the
  reflected side, except for art whose anchors and handles lie on one
  line.
- Deleting the art, changing its anchor count or whether it is closed,
  turning an angle's arm into a curve, or making a measured circle or
  arc no longer circular leaves the dimension where it was, no longer
  linked, instead of removing it. Undo links it again.

Docs: docs/dimensions.md, docs/target-app-parity.md.
2026-11-10 21:25:59 -08:00
dotCooCoo ed17e8fc17 Dimension tool: linear dimensions measure horizontally, vertically or aligned
A linear dimension between two clicked points, or dragged out from a
segment, always measured the straight distance between its points and
drew its line parallel to them, so two points at different heights gave
only a slanted dimension. The linear dimensions help describes aligned,
horizontal and vertical linear dimensions: after the second click,
clicking again gives an aligned one and moving the pointer gives a
horizontal or vertical one.
https://helpx.adobe.com/illustrator/desktop/measure-and-align/plot-and-measure/plot-linear-dimensions-of-objects.html

While a linear dimension is being placed, the pointer's position sets
whether it is aligned, horizontal or vertical. The rule is VectorCraft's
own. With the pointer beside the two points (the nearest point of the
line through them lies between them) or on that line, the dimension is
aligned. Past either point, the line through the points and the
perpendicular through that point bound a quarter on each side of the
line. The quarter that holds the direction straight up or down gives
the horizontal distance, and the quarter that holds the direction
straight left or right gives the vertical distance. A click within
reach of the second point, or of where the pointer was for the second
click, places it aligned. Points on one horizontal or vertical line
give an aligned dimension. The dimension stays linked to the anchors it
measures.

- Dimension recipes carry an orientation (aligned by default; files
  without it open as before). The line runs along the axis, and each
  extension line runs from its point to it.
- dimension.create and dimension.update take orientation: aligned,
  horizontal or vertical, for linear dimensions only. Any other value
  is an error. A new orientation keeps the line on the side of the
  points it was on, and an update that changes nothing records no
  undo step.
- A horizontal or vertical dimension keeps its orientation when it or
  the art it measures turns, and shows 0 when its points come into line
  across its axis. A line that lay outside the points stays outside
  them after a turn.
- The hint bar names the two-click placement.

Docs: docs/dimensions.md, the Evidence list in docs/target-app-parity.md.
2026-11-10 16:54:35 -08:00
BFlat 811bce73ae Merge pull request #6468 from dotCooCoo/fix/compound-member-copy-style
Edit: a copied compound member takes the compound's graphic style link
2026-11-11 05:33:49 +07:00
BFlat 92b61461f9 Merge pull request #6457 from slafebre/fix/6335-remember-color-settings
Fix #6335: Color Settings are remembered across restarts
2026-11-11 04:51:27 +07:00
BFlat 54092a0a01 Merge pull request #6462 from dotCooCoo/feat/plugin-call-commands
Plug-ins: an API level 2 plug-in calls the commands its manifest lists
2026-11-11 04:37:37 +07:00
dotCooCoo c92dad3838 Edit: a copied compound member takes the compound's graphic style link
Make Compound Path leaves each member's graphic style id in place. A
member copied or cut on its own took the compound's appearance but kept
that old id, so the clipboard carried an unrelated style and the pasted
path was linked to a style that did not match its look.

The copied member or piece now takes the compound's link while it has
that style's look, and no link otherwise (no style on the compound, or
a gradient pinned to the compound's bounds). It also takes the
compound's knockout setting with the rest of its transparency.
2026-11-10 13:28:28 -08:00
Sven Lafebre 8ce5df2109 Fix #6335: document the Color Settings test guard's drop 2026-11-10 22:07:56 +01:00
Sven Lafebre 12bc0a49b5 Fix #6335: the Color Settings persistence tests run in their own process
They switch the process-wide Color Settings away from the defaults, which
every colour the engine's unit tests show or render goes through, so they
move to tests/color_settings.rs as the note on colormgmt's GLOBAL asks. The
round-trip test now also unregisters the loaded profile before the next
session, so it shows the profile store registering it again before the saved
settings name it.
2026-11-10 22:00:19 +01:00
dotCooCoo f42b03f392 Plug-ins: a call reads no file, whatever param names it
A call whose arguments hold a file or folder key at any depth, such as an
effect's textureImage.path, is refused before the command runs; the walk
keeps its own stack. Each call also runs with automation file access
confined to no roots, so every checked read or write a command makes is
refused, whichever param carried the path.
2026-11-10 12:41:46 -08:00
dotCooCoo 99826f274c Edit: a copied compound member keeps the compound's isolated blending 2026-11-10 12:36:18 -08:00
dotCooCoo 668b3fa3d7 Edit: a copied member keeps its compound's gradient, and Clear leaves no empty compound
A compound member copied or cut on its own now keeps the compound's
gradient fitted where it was: an unplaced gradient is pinned to the
compound's bounds, measured once per compound.

Clear that deletes every anchor or segment of every member of a compound
path now removes the compound too, as Cut does, instead of leaving an
empty compound in the layer.

The edit.copy and edit.clear descriptions, docs/mcp.md and the progress
line now say that selecting the compound copies it whole, that isolation
mode takes each member as itself, and how a compound of one and Paste in
Front with the copied member still selected behave.
2026-11-10 12:25:30 -08:00
dotCooCoo 1f8423c2a9 Edit: Copy and Cut of a whole compound member take only that member
A compound-path member selected on its own, whole with Direct Selection
or with Group Selection, is now copied as an ordinary path instead of
promoting the selection to its compound. Cut removes the same objects
Copy takes, so the other members stay a compound path, a compound of
one included. The compound is still taken whole when every member is
selected whole, or when the compound itself is selected.

A copied member or piece takes the compound's paint, opacity, blending
mode, opacity mask, pixel alignment and fill rule.

Tests that pinned the earlier rule from #786 now check the new one.
2026-11-10 11:26:35 -08:00
dotCooCoo 811c21e7c2 Plug-ins: calls need doc.read, and an edit in progress is kept before a calling run
A command's result describes the document, so a plug-in without doc.read
gets -6 for every call, whether or not the id names a command. A run that
calls commands commits an edit still in progress first and prepares its
input again when that changed the document or the selection.
2026-11-10 11:26:10 -08:00
dotCooCoo f921a6923d Plug-ins: an API level 2 plug-in calls the commands its manifest lists
A filter at plug-in API level 2 with the new `commands` permission names
the commands it may run in its manifest's `commandAllowlist` and runs
them with `env.vc_call`, reading each result with `env.vc_call_result`.
Each call runs through Session::execute on the run's document and sees
what earlier calls changed; the calls and the filter's output are one
undo step, and a run that fails, is cancelled or makes a failed call
leaves the documents, their history and the session state the commands
change as they were.

Commands that touch files, the clipboard, preferences, the view,
scripts, actions, plug-ins, open documents or the undo history are never
callable, and every other command must be listed as allowed in
cmd/plugin_call/reviewed.rs, so a new command is refused until placed.
Calls are capped at 1,000 a run, 8 MiB a call and 64 MiB a run, and each
costs instructions from the run's budget. plugin.install refuses a
manifest that lists a refused command and reports unknown ids;
plugin.inspect lists both, and the approval dialog lists the commands.

Refs #2186
2026-11-10 10:16:28 -08:00
BFlat ef81d550e4 Merge pull request #6371 from dotCooCoo/fix/issue-6361
Part of #6361: Cut takes direct-selected anchors out of the path
2026-11-10 10:07:20 +07:00
dotCooCoo bed632cc65 Transform: butt-capped lines measure to their end points with Use Preview Bounds
With Use Preview Bounds on, the visual box of a butt-capped stroke on an
open path grew by half the stroke weight past each end of the path, where
a butt cap paints nothing. A 2 pt vertical line set to H: 10 mm in the
Transform panel drew about 9.3 mm long.

The box of an open subpath with butt caps no longer reaches past its
ends. A straight segment's box comes from the four corners of its stroked
rectangle, and a curve's box comes from the stroke at its ends and where
its tangent is square to an axis. Bevel joins, and miter joins the limit
bevels, are measured by the stroked corners, and round joins by the arc
they paint outside the turn, instead of half the weight all round. Round
and projecting caps, arrowheads, closed paths and miter tips measure as
before. Two cases can still measure larger than the stroke paints: a
curve that bends more tightly than half the weight, and a butt-dashed
path whose first or last dash is a gap, which is measured to the path's
ends.

A horizontal or vertical butt line now measures one stroke weight less
along its length in W or H, and Align places it by its end points. A
slanted line's box shrinks by less: the stroke's corners still reach
past the end points across the line. object.setBounds measures as drawn,
after each scale it tries, a butt-capped open path with a segment at a
slant, symbol instances' art included.
2026-11-09 18:16:48 -08:00
dotCooCoo cb086ef1b7 Part of #6361: Cut takes direct-selected anchors out of the path
With anchors picked with Direct Selection, Edit > Cut removed only the
segments between them, so the picked anchors stayed in the path. Cut now
removes picked anchors and the segments attached to them from a path or
a compound path's member, as Clear does. Picked segments still lose only
those segments. When a path has picked segments, Copy and Cut leave out
anchors picked on its other contours, as Clear does.

Docs: docs/target-app-parity.md.
2026-11-09 17:03:43 -08:00
Don Omondi 1b7c648da6 EPS import: embedded Type 1 fonts draw and space their type with their own glyphs
An embedded Type 1 font's eexec part is decrypted and its charstrings read,
so its glyphs and widths are used instead of the installed or fallback
font's. Codes are decoded through the font's Encoding, so fonts that place
glyphs at low codes no longer lose their type.
2026-11-09 03:48:35 -05:00
Don Omondi fde5a5fbef EPS import: CID-keyed fonts draw the glyphs of the CIDFonts the file carries
Adds composefont, the CIDInit and FontSetInit procedure sets and the CMap
operators, so EPS with CID-keyed fonts (as pdftops -level3 writes) opens.
Type 0 fonts with FMapType 9 decode their codes through the CMap's codespace
ranges and CID mappings, and the Identity CMaps are predefined.
2026-11-09 03:48:35 -05:00
dotCooCoo eebbe496d4 Merge main into fix/plugin-grant-app-approval 2026-11-08 23:53:57 -08:00
BFlat 0f2857e1a1 Merge pull request #6286 from dotCooCoo/fix/plugin-stale-grant
Plug-ins: replacing a granted plug-in with one that lists no permissions removes the grant
2026-11-09 15:41:04 +08:00
dotCooCoo 0efd9a9ccc Merge main into fix/plugin-grant-app-approval 2026-11-08 23:26:53 -08:00
dotCooCoo c2753c1169 Merge main into fix/plugin-grant-app-approval 2026-11-08 22:17:36 -08:00
dotCooCoo cd7dd5f3cc Merge main into fix/plugin-stale-grant 2026-11-08 22:03:18 -08:00
ruchirguitarandCursor 7690e2e0ad M2.1: merge main again and keep path-deletion evidence (#3380)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-09 11:25:37 +05:30
BFlat fbf43fccf0 Merge pull request #5200 from dotCooCoo/fix/ai-os23-3678
.ai import: objects with a centered variable-width stroke come in as their drawn outline
2026-11-09 13:48:39 +08:00
dotCooCoo 1756672a20 Merge main into fix/plugin-stale-grant 2026-11-08 21:32:32 -08:00
BFlat d90cc305fa Merge pull request #6148 from magyarb/fix/ai-right-aligned-tabs
.ai/EPS import: type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page
2026-11-09 13:18:23 +08:00
BFlat cc02f7b35e Merge pull request #4379 from dotCooCoo/fix/shape-builder-merge-off-ui-thread
Shape Builder: a large selection merges on another thread
2026-11-09 13:10:54 +08:00
dotCooCoo 7af608276e Merge main into fix/plugin-stale-grant 2026-11-08 21:00:56 -08:00
dotCooCoo e7c3307f07 Merge main into fix/plugin-grant-app-approval 2026-11-08 20:58:47 -08:00
dotCooCoo d3d56f01ce Merge main into fix/ai-os23-3678 2026-11-08 20:58:09 -08:00
BFlat a32bd3dc92 Merge pull request #6234 from dotCooCoo/fix/save-screens-unknown-options
Save: the save commands and Export for Screens refuse an unknown option key
2026-11-09 12:49:37 +08:00
BFlat baa7248e76 Merge pull request #5158 from dotCooCoo/fix/ai-os23-2831
.ai import: names that aren't UTF-8 can be read in a legacy code page
2026-11-09 12:46:30 +08:00
M Balazs PC 68133cc731 Merge remote-tracking branch 'origin/main' into fix/ai-right-aligned-tabs
# Conflicts:
#	docs/file-format-parity.md
2026-11-09 05:45:48 +01:00
dotCooCoo 9e655ae2e6 Merge main into fix/plugin-stale-grant 2026-11-08 20:38:46 -08:00
dotCooCoo 09cbf2b8f9 Merge main into fix/ai-os23-3678 2026-11-08 20:24:23 -08:00
dotCooCoo 73e5715f6b Plug-ins: the input kinds fuzz test installs with request grants allowed
The fuzz test from #6223 passes grant to plugin.install, which a plain
session now refuses, so its cases stopped installing the module. The
docs line for a filter that lists inputs now says installing it needs a
person's approval.
2026-11-08 20:23:54 -08:00
dotCooCoo fc728b909e Merge main into fix/shape-builder-merge-off-ui-thread 2026-11-08 20:23:21 -08:00
dotCooCoo bff7f0ad54 Merge main into fix/plugin-grant-app-approval 2026-11-08 20:16:56 -08:00
dotCooCoo 0b19003214 Merge main into fix/save-screens-unknown-options 2026-11-08 20:13:09 -08:00
M Balazs PC b64cfed610 Merge remote-tracking branch 'origin/main' into fix/ai-right-aligned-tabs
# Conflicts:
#	crates/text/src/layout/flow.rs
#	docs/file-format-parity.md
#	docs/roadmap.md
#	docs/target-app-parity.md
2026-11-09 04:48:48 +01:00
dotCooCoo 3258785476 Merge main into fix/ai-os23-2831 2026-11-08 19:44:24 -08:00
dotCooCoo 89b61de7f1 Merge main into fix/ai-os23-3678 2026-11-08 19:39:45 -08:00
dotCooCoo df100e978f Merge main into fix/ai-os23-3678
Only a Stroke Style filter's widths written as one centered array come in as the drawn look. A Stroke Offset stroke and widths written for each side stay live with their profile.
2026-11-08 19:39:44 -08:00
ruchirguitarandCursor 3deac491ca M2.1: merge current main and keep path-deletion evidence (#3380)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-09 09:03:17 +05:30
dotCooCoo fe7b71b857 Plug-ins: the clear-cache test installs with request grants allowed
plugin.install refuses grant from a request unless the session was started
to allow it, so the test from main that installs with grant turns that on.
The install dialog's comment names OK's Sense::click.
2026-11-08 19:26:55 -08:00
dotCooCoo 67e3d6f13f Merge main into fix/save-screens-unknown-options 2026-11-08 19:13:11 -08:00
dotCooCoo 529dcb5c64 Merge main into feat/plugin-filter-inputs 2026-11-08 19:06:11 -08:00
dotCooCoo 4941b377f9 Merge main into fix/plugin-grant-app-approval 2026-11-08 19:01:49 -08:00