The three buttons act on the last color clicked (__color). After a change of reduction or color count, or through ui.dialog.set, that color can be one the table no longer shows, and a click added it to locked, transparent or webShift. The buttons are now enabled only when the table shows that color, the same check Delete Color uses.
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
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.
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.
`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.
The line for layer.highlight said set and add always look rows up in a
set. The command builds the set in every mode only when more than 8 ids
name objects after the list is cut to 100,000; with fewer it searches the
rows. The Layers panel's range preview always uses a set.
Chevron Arrow stretches only the shaft before its second chevron, so
both chevrons keep their length however long the path is. The Bundled
content row counts the Arrows library.
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.
Marks and Bleeds in the Save PDF dialog and the PDF preset editor gets a
link button beside Top, Bottom, Left and Right. While it is on, editing
one value sets all four; turning it on gives every side the top value.
It opens on when the four values are equal, and choosing a preset or
Reset sets it again from that preset's values. With Use Document Bleed
Settings on, the button is grayed out and the custom values stay as they
were. The link is not an export option or a preset setting;
ui.dialog.set sets it as __bleedLinked and refuses anything other than
true or false.
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.
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.
The brush library evidence in docs/target-app-parity.md names Arrows and describes its five brushes, the Strokes rows and the M10 row in docs/roadmap.md count eleven libraries, and the docs/ui-parity.md checklist row lists Arrows.
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.
layer.highlight searched the highlighted rows once for every id it was
given, so a range of n rows took about n^2/2 comparisons, and the panel's
preview of the rows (apply_row_click) did the same before sending the
command. Both now keep a set of the highlighted rows beside the ordered
list. layer.highlight builds the set only for more than 8 ids, so a
one-row Ctrl/Cmd-click toggle does not pay for it.
The rows, their order, the returned rows, the current layer and the
revision are unchanged; tests compare the command with the per-id search
on 3,000 rows and the widget with it on 5,000 rows.
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).
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).
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.