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
Running a script or a plug-in now ends the spot color base's link, as a
batch step already did, so a script that deletes the spot color and makes
another of the same name does not make the new one the base. Commands that
only list scripts or plug-ins keep the link.
While the link waits for an Undo, the color it captures before a command is
the one the guide shows, not that of a new spot color of the same name.
The Enclosing Lasso Tool joins the Lasso group in both shipped
toolbars, right after the Lasso, and stays in Object › Plug-ins ›
Enclosing Lasso. The All Tools drawer lists it once, under Select, and
Edit › Keyboard Shortcuts › Tools lists it once. It has no default
shortcut, and the Lasso keeps Q. A toolbar the user already edited
keeps its saved layout; Reset Toolbar adds the tool.
Fixes#6117
Look::takes let a glyph filled only join a run whose glyphs were also
stroked, so after mode 2 text a mode 0 glyph took the run's stroke:
`2 Tr (B) Tj 0 Tr (C) Tj` came in as "BC" stroked throughout. A glyph
now joins only a run drawn alike (fill, stroke, overprints), so a glyph
filled only starts a run of its own and takes a stroke only when the
matched-stroke path (#8039) strokes it.
flush_stroke no longer strokes a whole run in place: a whole run goes
through the split and join code, so fill and stroke rendering glyph by
glyph still builds one stroked run.
A Swatch Options rename of the spot color base keeps it the base, also
as a command.batch step, and so do an Undo and a Redo of the rename.
Deleting the swatch or its color group, merging it into another, making
it a process color or closing its document ends the link, so a later
spot color of the same name does not become the base until it is chosen
again. The base keeps the color it showed.
A batch's Activate Document, New, Open, Close and Move Document steps
are followed, so steps in another document leave the link alone. When
the swatch goes in a way the panel does not follow, the link waits for
an Undo or Redo, and the next other command ends it.
A PDF/X-4 export wrote xmp:ModifyDate and xmp:CreateDate in its XMP
metadata but no xmp:MetadataDate. The PDF/X-4 metadata edit now adds
xmp:MetadataDate next to xmp:ModifyDate, with the same value, and grows
the stream's /Length to match. When the export dates the file as modified
later, post::modification_date already rewrites every xmp:MetadataDate,
so the two dates stay equal.
PDF/X-1a, PDF/X-3, PDF/A and plain PDF exports are unchanged.