Commit Graph
16974 Commits
Author SHA1 Message Date
BFlat fd93db206b Merge pull request #8033 from dotCooCoo/feat/palette-stems
Command Palette: a plural or verb form finds the command
2026-11-18 10:11:13 +07:00
dotCooCoo 0602c437da Color: the Fill and Stroke proxies find the selected objects through the id cache
DocState::proxy_mixed, which decides whether the Fill and Stroke proxies
show "?", walked every node of the document to find the selected
objects, even with one object selected. The Tools panel proxies, the
paint chips and the task bar ask for it on every frame whose revision
changed, which includes each frame of a drag preview, and new art asks
for it after a selection change.

Document::nodes_in_order finds every node with one of the given ids in
tree order. When the id cache holds each id once at a path that still
checks out, it reads the nodes along those paths; otherwise, and for a
selection of an eighth of the document or more, it walks the tree once,
as before. Unlike Document::index_paths it returns every node with a
repeated id, so a damaged file that repeats an id keeps the question
marks it had. proxy_mixed now gathers the selected objects through it.

Tests compare the result with a copy of the old walk for one object,
different fills and strokes, a group, a group with one of its objects,
two layers, a hidden object, Appearance items, picked gradient mesh
points beside another object, ids not in the document and a repeated id
with different paints, with the cache built and dropped, and for 200
random selections. A cost test shows that with one object selected only
that object is read and the tree is not walked. Document tests compare
nodes_in_order with a walk.

The gain shows on large documents. On 50,000 rectangles in 500 groups
on 5 layers (release build on Linux, thread CPU time, median of seven
alternating runs of both versions in one process; an ignored test,
proxy_mixed_timing, times them):

  Selection                    old       new
  1 object                     995 us    under 5 us
  2 objects, different fills   810 us    under 5 us
  a group of 100               875 us    5 us
  all 500 groups               3,615 us  2,575 us
  all 50,000 objects           4,075 us  3,470 us
2026-11-17 19:02:15 -08:00
dotCooCoo fc5460d18e Save for Web: GIF lossy compares pixels with the web-snapped colors
Web shift and web snap now run before lossy compression again, so a pixel
is compared with the color its neighbor's entry is written as. Colors
shifted by hand are written after lossy, which still moves no pixel into
or out of them.
2026-11-17 18:57:53 -08:00
dotCooCoo 98a0eaab43 Find Font: the document's font list is worked out once per document version
While Type > Find Font... is open, the dialog ran text.fonts on every
frame, and the missing-font walk on every frame where a folder picker is
available. Each walks all of the document's type and resolves its fonts.
The dialog now keeps both answers for the active document's uid, the
version of its content and the font database's generation, and works
them out again only when one of those changes. A new selection keeps
them. The list, its counts and statuses, and Find in Folder... are the
same as before.

With 2,000 point-type objects of 50 characters each, this took a median
1.53 ms of thread CPU time per frame in a release build on Linux; later
frames of one version now take about 10 ns. With 20 such objects it took
58 us per frame.
2026-11-17 18:52:47 -08:00
dotCooCoo 46dd113eaa EPS import: token and search read a string in place instead of copying it
`token` on a string copied everything left in the string before scanning
one object, and `search` and `anchorsearch` copied both strings before
comparing them. A program that walks a string by what each call leaves
copied the rest of it on every call. All three now read the strings in
place and release the borrow before the scanned object is checked
against the budget and before the results are pushed. Results, errors
and the operations charged against the budget are the same as before.

Walking a 512 KiB string takes 16 ms instead of 518 ms with `token` and
1.0 ms instead of 27 ms with `search` (release build on Linux under load
from other builds, median of 7 alternating runs); on a 4 KiB string the
difference is under 0.1 ms.

Tests in tests_strings.rs compare each operator with the copying code on
the same operands (stack, error and operations left after every call),
check that the results see later writes to the string, and check that
no string is copied.
2026-11-17 18:47:53 -08:00
dotCooCoo 25fb15f5d3 Preferences: Interpolate Control Points When Moving Anchors has a description sentence
The Preferences dialog's description line needs one sentence for every General setting, and every catalog a row for it.
2026-11-17 18:46:16 -08:00
dotCooCoo a83354cd99 Type: the scatter-brush Document filter test reads through the menu's cache
The test keeps one menu state with the Document filter on, so the
deletion and its undo have to replace the cached families.
2026-11-17 18:43:10 -08:00
dotCooCoo f2a48d2a30 Color: Refresh Monitor Profile's reader doc says when a request is dropped
A frame that finds Use Monitor Profile for Canvas off drops a waiting
request; a request made with the preference on is kept when the
preference goes off and on again between two frames.
2026-11-17 18:39:01 -08:00
dotCooCoo 46776a81ca Path Precision Tools: Smooth Bridge keeps huge circles' outlines finite
The bridge's distance and arc-center math no longer squares lengths, so
circles larger than about 1e154 pt are bridged instead of refused, and
an outline that would not fit in f64 is refused instead of written with
non-finite anchors.
2026-11-17 18:38:11 -08:00
dotCooCoo 3a42ec2168 i18n: French Use Monitor Profile message has no-break spaces inside « »
The row for "turn on Use Monitor Profile for Canvas first" had ordinary
spaces after « and before »; it now uses U+00A0 like the other
guillemets in fr.tsv.
2026-11-17 18:28:55 -08:00
dotCooCoo 8486bd1892 Save for Web: pixels of a transparent color that does not fit in a fixed palette stay transparent
With transparent pixels and Colors at 256, a custom palette of one opaque color and 255 colors mapped to transparent has no room for the last of those, and its pixels took the nearest entry left, which could be the opaque color. Such pixels now take the transparent entry when their nearest color is one that did not fit.
2026-11-17 18:27:15 -08:00
dotCooCoo 67ee9657ac Rerun CI 2026-11-17 18:24:55 -08:00
dotCooCoo ed991619f0 Merge main into feat/display-profile-read-again 2026-11-17 18:24:55 -08:00
dotCooCoo dedc6a5433 Rerun CI 2026-11-17 18:24:53 -08:00
dotCooCoo ced9eefa1f Color: test that built-in CMYK profiles separate saturated inks back
The colorimetric table of each built-in CMYK profile is checked on
solid and two-color overprint inks: CMYK to the connection space and
back through the profile's own tables lands within a Delta E 2000 of 3
of the original inks.
2026-11-17 18:21:31 -08:00
dotCooCoo c66272a9e3 Layers: in Draw Behind a new layer goes directly below the current layer
layer.new without `top` or `below` now reads the drawing mode: in Draw
Behind the new layer goes directly below the current layer, at its level
(a sibling below a current sublayer), as the help page describes
(https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=234).
The Layers panel button, the panel menu, Ctrl/Cmd+L and the Layer
Options dialog all go through layer.new. `top` and `below` keep their
meaning in every mode, Draw Normal and Draw Inside keep a new layer
above the current one, and New Sublayer is not affected.
2026-11-17 18:19:14 -08:00
dotCooCoo 149b9dc93c Docs: the PDF format entry appears once
docs/target-app-parity.md listed the SVG/SVGZ and PDF format entry twice; the shorter copy is removed and the entry that also names the .ai and EPS image sources stays.
2026-11-17 18:10:09 -08:00
dotCooCoo abf1a917d0 i18n: Polish preference descriptions call art and artwork kompozycja
Fourteen Polish rows that came in with main's preference descriptions
named art and artwork grafika. They now use kompozycja in the case each
sentence needs, as polish_rows_call_artwork_kompozycja requires.
2026-11-17 18:04:33 -08:00
dotCooCoo 21e0b780e7 Path Precision Tools: Common Tangents draws the lines from a point to a closed path
Common Tangents (addon.pathtools.commonTangents) now also takes a point,
a path of one anchor, together with a convex closed path. The lines run
from the point to where they touch the path: two from a point outside
it, one from a point on its outline (centered on the point and as long
as the path is wide along it, or the whole straight side the point lies
on), and none from a point inside, which leaves the document unchanged
and returns a warning. Centerline adds the line from the point to the
path's center. Every Tangents value gives the same lines; two points
are refused.

The geometry treats the point as an outline whose support value is
p . n, so the existing root search finds the lines.

Docs: docs/mcp.md, docs/target-app-parity.md, ROADMAP. The new warning
has a row in every catalog.
2026-11-17 18:03:55 -08:00
dotCooCoo bbfa29789b Rerun CI 2026-11-17 18:02:24 -08:00
dotCooCoo 89b0c5b72b Width Point: stroke.widthPoint.set refuses outgoing widths without outIndex
A call with outLeft or outRight but no outIndex set the incoming point
alone and reported success, so the outgoing widths were dropped. It is
now refused as a missing outIndex, and the document and history stay
as they are.
2026-11-17 18:01:57 -08:00
dotCooCoo 5ac41ee089 Save for Web: Delete Color skips selected colors the table no longer shows
A selection made before the reduction or the color count changed, or set
through ui.dialog.set, could name a color the table no longer holds. Delete
Color stayed enabled for it, added the absent color to colorTable.deleted
and fixed the table as a Custom palette although no shown color was
deleted. Delete Color is now enabled only for selected colors the table
shows and deletes only those; a selection with none of them is cleared and
the table is left unchanged.
2026-11-17 17:56:55 -08:00
dotCooCoo 94606cb867 i18n: French and Traditional Chinese plane positioning rows follow their catalogs
The French row for "Automatic Plane Positioning is off" uses a colon with
a no-break space before it, as the French catalog's other messages do. The
Traditional Chinese row puts the setting's name in 「」, as the catalog's
header asks for the name of a setting.
2026-11-17 17:56:49 -08:00
dotCooCoo 200bea74af Select: Next Object Above and Below check only the selected object's siblings
Each press collected every object Select All can reach into a set and then
tested only the siblings of the selected object. The siblings are now tested
one at a time against the layers and groups that hold them, with the same
rules as the walk: sublayers and the ruler guides of a layer are passed over,
and an isolated object on its own is the one there is to select. The selected
object is the same.

A random-document test compares every node and every step, isolation mode
included, with a copy of the earlier search. On 100,000 rectangles a step
took a median of 11.5 ms of thread CPU time before and 0.08 us after
(next_object_perf, release build).
2026-11-17 17:52:37 -08:00
dotCooCoo e69c4f880d Merge main into fix/pl-catalog-translates-art-artwork-two-ways-in 2026-11-17 17:50:58 -08:00
dotCooCoo 385b4c5e82 Cut: direct-selection Cut removes whole and emptied paths in one pass per parent
Cut with direct-selected anchors or segments removed each object selected
whole, and each path it left with no segment, with its own remove. Every
removal shifted the siblings after it, so later lookups walked the
document's tree again. With 2,000 roots removed whole, the old loop
walked the tree 10,005 times.

These removals now go through the same batch that already places the
surviving pieces, which rebuilds the children of each layer or group
once, and compound paths left with no members are removed after it. A
compound path left with one member stays a compound path. The document,
the selection, the clipboard and the undo step are the same as before.

With 2,000 of 10,000 squares on one layer selected whole and two anchors
of another picked, Cut walks the tree 8 times instead of 10,005 and
takes a median of 11 ms of CPU time instead of 573 ms (release build on
Linux, seven alternating runs in one process).
2026-11-17 17:49:21 -08:00
dotCooCoo cbee69ef49 i18n: French Smooth Bridge message takes a narrow no-break space before the colon 2026-11-17 17:47:23 -08:00
dotCooCoo 9f84820d88 MCP: transform checks scale, reflect and shear before any step runs
The transform tool runs move, rotate, scale, reflect and shear as separate
commands. A shear angle that object.shear refuses, such as 90, a reflect
axis other than vertical or horizontal, or a scale of 0 failed only after
the earlier steps had changed the art and recorded undo steps. The tool now
checks those params first with the rules the commands use
(scale_factors, reflect_axis and shear_tangent, shared with object.scale,
object.reflect and object.shear), so a refused request changes nothing and
records no undo step.
2026-11-17 17:42:44 -08:00
yoriswind 0dd87f8921 Merge main into the qualified Eraser group-stroke repair 2026-11-17 17:40:53 -08:00
dotCooCoo 38a178154b Merge main into feat/smooth-bridge 2026-11-17 17:38:12 -08:00
dotCooCoo 55b8fa8b6a Width Point Edit: the dialog and stroke.widthPoint.set share one pairing rule
The dialog and stroke.widthPoint.set each tested whether two width
points are the halves of one discontinuous point. The test is now one
engine function, width_point_pair: a point and the next one are the
two halves when they are the only points within 1e-6 of the first
one's place. The dialog still picks which point to test, and the
command still returns its error when the indices are not a pair.
2026-11-17 17:31:06 -08:00
dotCooCoo f6c512920a Save for Web: a fixed palette keeps an opaque color when it maps colors to transparent
With a fixed palette (Custom table), the colors listed in colorTable.transparent
all become the one transparent entry, so together they now take a single slot of
Colors, and the opaque colors fill the remaining slots in palette order. Before,
the palette was cut to its first entries; when those were all mapped to
transparent, every opaque pixel took one of them and the whole image turned
transparent, and with a deleted color the export was refused although an opaque
color was left past the cut. The check that a deletion leaves an opaque color
now reads the whole palette.

When no pixel is transparent and no pixel takes a color mapped to transparent,
that slot goes to the next opaque color. At 256 colors one entry stays for a
color mapped to transparent.
2026-11-17 17:29:11 -08:00
dotCooCoo a5cc189172 Shapes: a Circle tool drag ends where it is let go
A release away from the last drag point now moves the circle's points to
the release position before the circle is drawn, for a drag from the
first press, from a second press and from a press on the first point. A
release within 2 screen points of the press is still a click and keeps
the point of the press.
2026-11-17 17:18:46 -08:00
dotCooCoo de06497716 Commands: each built-in command's parameter keys are parsed once per process
Session::execute asked about a command's params description several
times per command (the key check, whether `id` stands for `ids`, whether
it takes `ids`), and each question parsed the description again, with a
command lookup for each word after the first of each `…` entry. The
engine now reads every built-in description, and the ones its `…`
entries name, once into a table keyed by the description's address and
length, and answers accepted_keys, takes_key, id_stands_for_ids and
check_keys from it.

A plug-in command's description, and a built-in description whose `…`
entries name a plug-in command, are still parsed where they are used,
since plug-ins change while the app runs. The keys, answers and error
messages are the same; tests::params_cache compares them for every
built-in command against a fresh parse.

In a release build on a one-object document, object.move with ids and
dx takes 48 us of thread CPU time per command instead of 61 us, and
select.set with ids 2.3 us instead of 3.2 us (medians of 7 alternating
runs of 20,000 commands in one process, while other builds were running;
tests::params_cache::bench_params_keys_once). The time is saved per
command, in scripts, batches and MCP or plug-in call loops, and does not
grow with the size of the document.
2026-11-17 17:12:35 -08:00
dotCooCoo e5d1186412 Color Themes: the Create tab edits the selected color with CMYK, RGB, Lab and HSB sliders
The Create tab had only a hex field for typing the selected theme
color's values. The help page describes changing the selected color's
values in CMYK, RGB, Lab, HSB or hex while making a theme:
https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=221

A Color Mode menu (CMYK, RGB, Lab, HSB) under the theme's colors shows
a rail and a number field for each component, beside the hex field. The
rails are the Recolor dialog's, so they step with the arrow keys and
take screen readers' set-value action.

VectorCraft's own rules: the menu starts in the selected color's model
(HSB for a gray) and keeps the mode picked while the app runs; picking a
mode changes no color. Ranges and whole-number steps are the Color
panel's (Lab a and b from -128 to 127); a number past the range sets its
end and text that is not a number changes nothing. A CMYK edit keeps the
color CMYK and a Lab edit keeps it Lab; RGB and HSB edits make it RGB.
An edit works as a hex edit does: with a harmony rule the edited color
becomes the theme's base and is selected, and in Custom only the
selected color changes. The sliders keep the numbers they set, so a
color taken to no saturation keeps its hue on the H slider.
2026-11-17 17:10:50 -08:00
dotCooCoo cd259b9fa8 Shear: 180 and -180 leave the art unchanged
The tangent of 180 degrees in radians is about 1e-16, not 0, so a shear
by 180 or -180 moved coordinates very slightly and recorded an undo
step. Angles within 1e-9 degrees of 0, 180 or -180 now shear by 0:
without `copy`, nothing moves and no undo step is recorded.

Docs: params text, docs/mcp.md.
2026-11-17 17:04:12 -08:00
dotCooCoo 099de92455 Width Point: the outgoing half adjusts the point after its pair
With Adjust Adjoining on, the outgoing half of a discontinuous point
looked for the point after it as the first one farther than 1e-6 from
its own place, so a point within 1e-6 of the outgoing half but not of
the pair's place was skipped. Both halves now measure from the pair's
place.
2026-11-17 17:02:33 -08:00
dotCooCoo f2f33b3a32 Width Point Edit: either half finds its pair as the engine pairs it
The dialog paired the points within 1e-6 of the opened point, so with
three points each that close to the next it paired the opened point
with a different neighbor than stroke.widthPoint.set accepts, and OK
failed. It now pairs a point with the next one when they are the only
points within 1e-6 of the first one's place, as the engine does, so
either half opens the same pair.
2026-11-17 16:33:11 -08:00
dotCooCoo 507a864c29 Rerun CI 2026-11-17 16:32:22 -08:00
dotCooCoo afcf8b6f78 Rerun CI 2026-11-17 16:32:15 -08:00
dotCooCoo 2829343e00 Rerun CI 2026-11-17 16:32:03 -08:00
dotCooCoo 5ed88cecc9 Rerun CI 2026-11-17 16:31:55 -08:00
dotCooCoo 8dabfbabab Rerun CI 2026-11-17 16:31:45 -08:00
dotCooCoo e7428b7cd3 Rerun CI 2026-11-17 16:31:44 -08:00
dotCooCoo 579b8a0316 Rerun CI 2026-11-17 16:31:36 -08:00
dotCooCoo 92020b43bc Rerun CI 2026-11-17 16:31:34 -08:00
dotCooCoo 52c696379c Rerun CI 2026-11-17 16:31:28 -08:00
dotCooCoo fd26667fbf Rerun CI 2026-11-17 16:31:16 -08:00
dotCooCoo b4404cceb0 Rerun CI 2026-11-17 16:31:15 -08:00
dotCooCoo 0d3249e44e Rerun CI 2026-11-17 16:30:58 -08:00