Patch::apply wrote each cross-reference entry by walking every edit, so a
pass with many edits took time in proportion to objects times edits. It
now keeps the running total of the length changes and finds, by binary
search over the edits' ends, how far each object moved. For every edit
set that apply still accepts, the written file is byte for byte the same.
An offset that no longer fits the ten digits of a cross-reference entry
(ISO 32000-1, 7.5.4) is now refused with an error instead of writing an
eleven-digit entry that breaks the table. A change in length too large
for an isize is refused with an error instead of wrapping.
The progress line now says that the writers share one layout of each
type object, and that the check for glyphs hanging outside a path's
brackets and the advances a reader gives live text can still lay out
a changed copy.
File › Place and a file dropped on the canvas read the file off the UI
thread, and the file was then placed wherever new art went when the read
ended. When the user made another layer current, isolated a group or
selected an object in another layer while a large file was read, the file
went into that layer or group.
The file now goes into the layer or isolated group that was current at
the dialog's OK or the drop, as a bitmap pasted from another app already
does, and the layer or isolation the user changed meanwhile stays as the
user left it.
When that layer or group is deleted, hidden or locked while the file is
read or the bitmap is decoded, the placed file or the pasted bitmap goes
where new art goes at that point, not into the topmost layer. A paste in
Draw Inside still goes inside the object it draws into while that object
can be edited.
The 3D and Materials panel checked on every frame whether a selected object has a 3D effect that Export 3D Object exports, looking up each selected object's parent and the node twice. With a plain selection of 200,000 paths that scan ran in full on every frame, about 60 ms of thread CPU time. The state is now kept in the canvas cache for the document's uid and revision, beside the other per-revision panel states, and the button shows the same state.
The Properties panel's Reset quick action and the Symbols panel's Break
Link to Symbol each walked the selected subtrees on every repaint,
reading each one in full until one held an instance, to learn whether
the selection holds a symbol instance. One walk per document revision
now records the instances and whether one has appearance changes of
its own, and later frames reuse it. Whether Reset Transformation would
change an instance is worked out from those instances on the first
request and kept with them.
The buttons and menu items are enabled exactly as before. With one
selected group of 300,000 paths, the two panels' reads took a median
5.1 to 5.7 ms of thread CPU time per repaint; the first read after a
change now takes about 3 ms and later repaints about 5 ns.
On the My Themes tab, the panel menu has a checked Show Find Field item
that shows a Find field above the list. The list then shows only the
saved themes whose names hold the field's text, anywhere and in any
letter case, in their saved order; colors are not searched, and a
search with no result shows "No matches.". A picked theme the field
hides stays picked, but Edit Theme, Add to Swatches and Delete Theme
are off until the list shows it again. The field is off in a new
session and does not change the saved themes or colorTheme.list.
The help page describes searching saved themes by name this way:
https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=255
The Blend panel, the Object › Blend, Envelope Distort and Gradient Mesh
menu items and their commands looked up every ancestor of each selected
object by id to find its nearest blend, envelope or mesh, and dropped
repeats with a linear scan. They now read the object's cached place in
the tree once, test the nodes on that path, and keep a set of the ones
already listed. The checks of whether one is selected stop at the first
selected object that has one. An id that the lookup cache does not
place on that path (a repeated id, or a cache older than the tree) is
still looked up by id, so the results, their order and the errors are
the same. Explicit ids given to the live commands drop nested ones with
a set as well.
With Select All of 102,200 objects (100,000 rectangles, 2,000 blends and
200 envelopes), a release build took a median of 16.5 ms of thread CPU
time for the Blend check before and 0.5 ms after.
object.shear clamped its angle to -89..89 without an error, so any angle
past 89 sheared by 89. It now takes the Shear dialog's documented range
of -359 to 359 degrees and shears by the angle's tangent, so 120 slants
as -60. An angle outside that range, and +-90 and +-270 (within 1e-9
degrees), where the tangent is unbounded, return an error naming
`angle`; nothing moves and no undo step is recorded.
Docs: params text, docs/mcp.md, docs/target-app-parity.md.
With characters selected with the Type tool, the button colors only those
characters and leaves the default for new art as it was, as a Color panel
or Swatches click does through the same paint.setFill and paint.setStroke
path. The code comment and the docs/target-app-parity.md line now say so,
and a test compares the button with paint.setFill on a selected range.
Opening Width Point Edit on either half of a discontinuous width point
now shows the Incoming and Outgoing side widths, each with Side 1,
Side 2, Total Width and its own link. OK sets both halves in one
stroke.widthPoint.set and one undo step, and Delete removes both.
Single Width Only keeps the incoming or the outgoing widths as one
continuous point. A continuous point keeps the one-set layout.
stroke.widthPoint.set takes outIndex, outLeft, outRight and single for
this. With adjustAdjoining, the nearest point before follows the
incoming change and the nearest point after follows the outgoing
change, once each. Indices that are not the two halves of one
discontinuous point, another t, or another single value are refused
without changing the document or its history.
Help page: https://helpx.adobe.com/illustrator/using/stroke-object.html
describes editing the widths on each side of a discontinuous point in
this dialog. The group labels, the adjoining rule and Delete removing
both halves are VectorCraft's own.
SVG export lays out each type object once and hands that layout to the
writer for live text, type on a path, outlines and inside or outside
character strokes, where each of them laid the same type out again.
Type on a path, bidirectional type and type that falls back to
outlines go from two layouts to one; inside or outside character
strokes and the object's own fills go from up to four to one. The
outline and character-stroke writers also group glyphs by run in one
pass instead of filtering every glyph for each run. The written SVG,
warnings and notes are unchanged.
A test compares the export with each writer laying the type out on
its own over 17 kinds of type and checks the layout counts; an ignored
test times a large document.
With a sublayer isolated, Exit Isolation Mode now isolates its parent layer
and selects the sublayer, so repeated use goes up one layer at a time and
leaves isolation mode from the top-level layer, as the help page describes:
https://helpx.adobe.com/illustrator/desktop/manage-objects/select-objects/isolate-objects.html
This applies to the Layers panel menu item, the isolation bar's back arrow,
the Control bar button, the canvas context menu, a double-click outside the
art and object.exitIsolation {}. Before, each of them left isolation mode in
one step.
- object.exitIsolation takes all (default false); all: true leaves
isolation mode from a sublayer at any depth. Any other value is an error.
- Esc and the top-level layer's crumb on the isolation bar pass all: true,
so they still leave in one step. A sublayer's crumb isolates that
sublayer.
- A hidden or locked parent layer is not isolated; the call leaves
isolation mode. A step up records no undo step. Groups keep their rule.
Lossy compression compared each pixel with the reduction's colors, so a pixel next to a color shifted by hand could join that color and be written in its new color, and a pixel of the shifted color could leave it. Lossy now leaves the entries of shifted colors alone, as it does the transparent entry.
A button on the Create tab, beside the pipette that copies the current
color into the theme, does the reverse: it sends the selected theme color
to the proxy in front, through paint.setFill or paint.setStroke with
keepModel, so the selection and the default for new art take it in its
own color model. A click is one undo step; a click that changes no art
adds none. The button is off without a document.
The help page describes this action for creating a color theme:
https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=222
While a Pen drag past the drag threshold shapes a handle, the Info
panel shows the change in x and y, the distance and the angle from
the anchor to the handle's end: the outgoing handle of a new, added
or last anchor, and the incoming handle of the first anchor when the
drag closes the path. Shift gives the constrained handle and Space
moves the anchor with it. The readout clears on release, a dropped
press and a tool change.
The writer kept every style text it checked, with its parse, until the
save ended, including texts the reader does not accept. A gradient style
placed on each object's outline is often a different text per object,
so memory grew with the number of objects checked.
The first 4,096 texts, up to 8 MiB of text, are kept parsed. Past that,
only the last text checked is kept, so the brush check that follows an
object's check reuses its parse, and other texts are parsed again when
checked. The written file is unchanged.
The color table's __editColor control opens the Color Picker on a source color, as a double-click on its swatch does. ui.dialog.set refused it as a protected field; Save for Web now lists it with its other controls.
crates/mcp/src/ui_catalog.rs is generated from the desktop UI command
table, and was not regenerated after symbolOptions gained edit and
keepArt. cargo xtask ui-commands regenerates it, and
cargo xtask ui-commands --check passes.
A Color Picker opened from a dialog's color (an effect's color, a
command form's color or a Document Setup grid color) now carries the
number that ui.sampleScreenColor uses to find the open picker. Its
eyedropper sends the sampled color to that picker instead of failing
with "the Color Picker is not open".
A click on the Control bar's X:, Y:, W: or H: label, with objects selected
or with the Artboard tool, opens the Transform panel in a popover under the
label, as the Transform link does; a second click closes it. The help page
(https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=374)
describes these labels as another way to bring up the Transform panel.
The click no longer gives the field the keyboard. A drag on the label still
scrubs the field, and the labels are not tab stops, so Tab still moves from
one field to the next.
Saving a .ai file resolves the font of every run of type twice: once
for its font record and once to check that the font comes back as
itself. Each resolution looks the face up, reads its axes and name
table, and scans the loaded faces by PostScript name, so a document
with tens of thousands of runs in a few fonts repeated the same
lookups for every run.
The text document now keeps what each style's font fields (family,
style, version and Variable Font settings, each setting by the bits of
its value) resolve to for the whole save, and reuses it while the font
database's generation is unchanged. A font added or loaded during the
save resolves it again. The font set is still searched and filled as
before, so its order, indices and rollback are unchanged. The output
is unchanged.
- Tests: a save resolves as many fonts for one row of type as for
four; the program, header, warnings and private data are the same as
with every run's font resolved again (many fonts, threaded type,
envelopes of type, and type taken back when an envelope is written as
its art); each resolved record and check equals the uncached one for
static and variable fonts, settings outside the axis range, not a
number, +0 and -0, and a missing family, and a value resolved before
the font database changed is resolved again. An ignored test times
the save of 10,000 point type objects in three runs over four fonts.
New type started in [Normal Character Style]'s fill only and always used the
default font and size. It now takes the style's font, style, size and other
character attributes too, so redefining that style in a New Document profile
sets the default font of the profile's documents. A font, style, size or
color given to text.create still wins.
Part of #8350
Double-clicking an opaque GIF or PNG-8 color-table swatch opens the
Color Picker. Its OK writes that color as the color picked wherever it
appears in the image; Cancel changes nothing. A shifted swatch shows the
original color at its upper left and the new one at its lower right,
with the lock mark. Double-clicking it opens the picker on the original
color, and OK on it takes the shift away. Unshift All Colors in the
table's menu clears shifts and web shifts.
- colorTable.shifted {"#source": "#rrggbb"} carries the shifts by
source color, in the settings, the remembered settings and presets.
A shifted color is kept when reducing, before locked colors, and wins
over Web Shift, Web Snap and Lock; a color mapped to transparent stays
transparent. Bad colors, duplicate keys and more than 256 entries are
refused. The preview marks shifted colors.
- GIF lossy compression compares pixels with the reduction's colors
before the table's edits, so a shifted or web-shifted color does not
take in the pixels of a nearby color.
- Web Shift replaces a shift by hand, Lock stays on for a shifted color,
and Delete Color drops a deleted color's shift.
Docs: docs/mcp.md, docs/target-app-parity.md.
The checks that look only at selected blends' spines (Direct Selection's
hover, press and marquee, the Anchor Point tool's press and handles, and
the Pen's click on a spine) walked the whole document and built every
blend's spine before keeping the selected ones. They now go through
direct::selected_spines, which returns an empty list when no selected
object is a blend and otherwise keeps the same order and filter. The
check that finds a point on any blend's spine is unchanged.
On 20,000 paths and 200 blends, 500 checks with one plain path selected
took 24 us instead of 336 ms; with one blend selected the time is the
same. Results are compared against the old filter in the tests.
find_command searched the list of about 1,000 built-in command specs in
order on every call, and a top-level command looks its id up at least
three times before it runs. It now finds a built-in in a map from id to
spec that is made on the first call. When an id is listed twice, the
map keeps the first spec, which is the one the search returned. An id
that is not a built-in still goes to the installed plug-ins' commands
at the time of the call, so installing or removing a plug-in shows at
once and built-ins keep precedence.
A scatter brush takes a Hue Jitter amount from 0 to 180 degrees (0 by
default). Each copy turns the hue of its solid fills and strokes, type
included, by its own amount up to that far either way, after the
colorization. The amounts come from the stroke's path and the brush
name, so a stroke draws the same colors on every redraw, after Save and
Open, and in export. Copies keep their places, sizes and rotations.
A color turns in its own model (RGB in the HSB of its values, CMYK over
C, M and Y with K kept, Lab by turning a and b). White, black and grays
stay as they are, and a symbol instance in the art turns only its stain.
A brush at 0 draws its copies in the colors the colorization gives them
and saves no hue_jitter key; a brush without the key reads as 0.
- brush.options takes hue_jitter, and brush.get shows it for every
scatter brush. Brush Options shows a Hue Jitter field (ui.brushOptions
field hueJitter) with rows in every catalog.
- The .ai editing data writer does not write the amount, so a jittered
brush is left out of the Brushes panel there and reported, as other
brushes that would open with other settings are.
Docs: docs/mcp.md, docs/target-app-parity.md.
When Document Setup's gridColors field holds a preset name (any case, as
document.setup takes it), the Transparency tab now replaces it with the
preset's two colors. The hex fields show them, a color box opens the
Color Picker on its color instead of white, and the picker's OK sets that
color instead of failing with "no such color".
The bar chooses Make Clipping Mask over Unite when the selection holds
images together with other objects. It counted the images among every
selected object on each frame it drew. The answer is now kept for the
document's revision, as the Smooth tool's check already is, and the
walk stops once it has seen an image and another object. An id with no
object still counts as another object, so the bar offers the same
actions as before.
With 131,072 rectangles selected, 120 frames took 2.52 s counting and
18 us with the kept answer; the first frame after a change takes the
same 20 ms as one count.
A click on a Transparency Grid color box whose press and release arrive
in one frame, while that color's hex field holds an edit, ends the edit
in the same frame. The box now records only which color was clicked, and
the Color Picker opens after the row on the color Document Setup holds
then, so it opens on the edited color and an unchanged OK keeps it.
Before, the picker opened on the color from before the edit and its OK
wrote that color back over the edit.
A hex field's edit also replaces its color in the pair Document Setup
holds when it commits, so a Grid Colors preset chosen in the same frame
keeps its other color.
The Symbols panel's bottom bar gets a Symbol Options button between Break
Link to Symbol and New Symbol. A click, with or without Alt, opens Symbol
Options on the current symbol, as the panel menu's Symbol Options… does
(`ui.symbolOptions {edit: true}`). The button is disabled while the
document has no current symbol, and it uses the Swatch Options icon.
When a New Document profile's Default Graphic Style differs from the shipped
one (white fill, 1 pt black stroke), file.new resets new art in documents
from that profile to the style's fills, strokes and effects, not linked to
the style. Default Fill and Stroke (paint.default, D) gives the defaults and
the selected art the same look in those documents; type still gets a black
fill and no stroke. A profile with the shipped style leaves the current fill
and stroke as they were.
Part of #8350
Saving a .ai file checks every art style it writes by reading it back
with the reader's style parser. Each object check parsed its style text
twice (once to read the appearance and once for the outline check), a
brushed style a third time, and a linked object first searched every
written style by name and copied its text. With thousands of objects
on a few styles, the same text was parsed tens of thousands of times.
The writer now keeps each style text's parse for the whole save, a
text the reader does not parse included, and reads it on each object:
the object's own gradient, the outline check, the brush check and the
appearance comparison still run per object. The own gradient is applied
to a copy of the parse, and that copy is the compared appearance; the
outline and brush checks read the kept parse.
Panel styles are found by their place in the written list. The output
is unchanged.
- import: parse_art_style, read_parsed_style and parsed_moves_with
split the parse from the reading; BrushesRead::style_reads takes the
parse.
- Tests: the parse count of a save does not grow with the number of
objects on the same styles; the program, header, warnings and private
data are the same as with a parse at every check; one parse read on
two objects gives each its own gradient. An ignored test times the
save of 40 graphic styles, 20,000 linked rectangles and 5,000 paths
with their own Outer Glow.
Running Locate Object or Locate Layer again on the row it already
highlighted wrote the same highlight, so the Layers panel did not open
the layers around the row or scroll to it: a sublayer whose layer was
closed since stayed hidden. layer.locate now leaves a one-time request
on the document (DocState::locate_reveal) that the panel takes on its
next frame, opening the layers around the located row and scrolling to
it whether or not the highlight changed. The request is not saved and
adds no undo step, and the panel drops it when the row is no longer
highlighted.