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.
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.
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 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.
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.
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.