The editing copy of a PDF-compatible .ai wrote every blend as its steps.
Blends the .ai reader opens live are now written live:
- The blend's key objects and, when it has a spine of its own, its
spine are written as a group on hidden lines, each key's dictionary
naming it a key and its id and the spine's naming it the spine. Its
steps follow as a group, then the Path Blends record of its spacing
(Smooth Color, Specified Steps, Specified Distance with its distance),
orientation (Align to Page, Align to Path) and keys, then its
dictionary (name, text wrap options, variables) and its opacity and
blending mode as a group's after its end. A spine edited on the canvas
is written with each key's anchor on the key. A replaced spine is
written with an anchor where each key sits, so it opens with those
anchors and lays out the same steps.
- Each blend is checked with the reader's own reading before it is
written, and the blends together against the objects the reader lays
out in one file. Written as their steps with a warning: blends with
easing, a color shift or start points; with effects, an appearance or
an opacity mask of their own; of objects other than paths, compound
paths and groups, of clipping groups, of more than 62 key objects, of
hidden keys or keys holding a blend; of keys with geometry or
Pathfinder effects or a group's own fills and strokes, which the
editing copy writes as their result; of keys the editing copy would
change otherwise (empty paths or subpaths, paths and compound path
members of several subpaths, several fills or strokes, strokes a plain
line can't draw, dashes of more than 64 lengths, hidden fills or strokes, fills or strokes other than
a color, in a Lab color or with transparency or effects of their own,
effects, opacity masks); blends where one key has a fill or stroke of
no paint or a stroke of no width and another has one that draws;
blends whose spine has more than one part;
blends whose step count is close to where rounding the written
coordinates and colors changes it; blends the reader would open with
other settings or not as drawn; blends inside objects with geometry or
Pathfinder effects or a group's own fills and strokes; blends in
opacity masks, pattern tiles, symbols and art cut to a clipping object
or nested eight levels deep in art written in place of other objects;
blends whose art would pass the most objects the reader reads; and
every blend on a large canvas.
- The steps set their own transparency and lock and hidden state after
the hidden lines, for readers of the printed form.
Each construct is written in the form the .ai reader reads (blend.rs,
read/document.rs blend roles, read/containers.rs end_blend, read/ops.rs
XP and transparency), and every object written counts toward the
reader's object limit as the reader counts it. The record's orientation
word and a blend with no spine part are read as #8243 reads them.
Blend Options, key objects and spines:
https://helpx.adobe.com/illustrator/desktop/manage-colors/apply-transparency-and-blending/blend-options-overview.htmlhttps://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=260
Tests: the round trip of blends of each spacing and orientation, with
no spine of their own, an edited spine and replaced curved spines,
named, at half opacity, hidden and locked, with text wrap options, of
compound paths, of groups and of 62 keys, each laying out the same steps
as the document's blend; the record's words (Align to Path's angle
included) and the dictionaries; the steps' own state after the hidden
lines; the same bytes on a second write; each case written as its
steps, with as many steps as are drawn, where they are drawn (among
them Specified Distance 0.03 pt from where its count changes, on a
spine of 200 segments, which comes back live on a spine of two); blends in
pattern tiles, opacity masks, symbols, art cut to a clipping object and
eight levels down; the object limit; the reader's blend limit; a large
canvas; fuzz cases for damaged written blends.
Docs: docs/file-format-parity.md.
When the orientation the record names didn't lay the steps out turned
as drawn, the import took the orientation whose steps sit closest to
the drawn ones by their centers alone. A half turn leaves the centers
in place, so a blend drawn Align to Path whose record named Align to
Page came in as Align to Page, with each step turned from its drawing.
The import now takes the closest of the orientations that pass the
check, and the closest of them all only when neither passes.
Test: grouped red and blue squares drawn turned on a spine running
right to left come in as Align to Path with a record naming either
orientation.
The check that the record's orientation lays the steps out as drawn
compared a step's outline as one set of lines. A half turn of a group
of a red square beside a blue one keeps that outline and trades the
squares' places, so such a blend passed as Align to Path. Each subpath
is now compared with the other's subpaths of a matching fill; a compound
path's members take its fill, and gradient or pattern fills are compared
with each other by their outline.
The check also tries the laid steps nearest first when it compares
outlines. Before, every step in place was compared, so a hundred steps
crowded within the tolerance used up the outline comparisons on the
first one and the check failed.
Tests: grouped red and blue squares on a spine running right to left,
drawn unturned, keep Align to Page with a record naming either
orientation, and keep Align to Path when drawn turned; a group of a
gradient-filled triangle turned a half turn doesn't match; a hundred
crowded steps match their drawn copies; 998 crowded steps keep Align to
Page.
With more than 16 drawn steps, the check compared the outlines of the
first 16 it tried and took the rest by their sizes, so a last step drawn
turned the other way still matched. It now compares the outlines of 16
steps spread evenly from the first to the last. A step that would take
more than 64 outline comparisons matches none, so the record's
orientation is not taken on an outline that was not compared.
The check that keeps a record's orientation compared two outlines by
their anchors alone. A square with its top side bent inward has the same
corners as its half turn, so the two matched. The check now also
compares the points a quarter, half and three quarters along each
segment, in both directions.
Two settings of a blend read from the editing data came from rounding
instead of from the file:
- The orientation was whichever of Align to Page and Align to Path laid
the steps out closer to where they are drawn. The check compares the
steps' centers, which turning the steps along the spine leaves in
place, so on a straight spine both fit and the rounding of the drawn
steps decided. The reader now reads the record's word 5 (0 is Align to
Page; a 32-bit float of 8 or more is Align to Path) and keeps that
orientation when it lays the steps out as drawn: in place, at their
drawn sizes and with each one's outline where it is drawn, which
turning a step moves. Otherwise it takes the closest, as before.
- A blend with no spine part opened with a straight spine and an anchor
at each key. When its record names the keys in their order, it now
opens with no spine of its own, which lays out the same straight
lines between the keys' centers. A record that names them in another
order still gets the straight spine in the record's order.
Blend Options, orientation and spines:
https://helpx.adobe.com/illustrator/desktop/manage-colors/apply-transparency-and-blending/blend-options-overview.html
Tests: the record's word 5 (0, 8, 8 plus an angle, and values that name
no orientation); the record's orientation kept where both lay out alike,
and not taken where it would turn the drawn steps (rectangles on a
vertical spine, triangles on a spine running right to left); outlines
that match whatever anchor a path starts at, with another anchor on a
side, with contours in another order and with a lone anchor, and live
art compared by its size; a blend with no spine part in record order
and in the other order.
main's gate fails french_catalog_uses_nonbreaking_prose_punctuation on
the "{pos} of {total}: {name}" row of fr.tsv, added by #8017, which has a
plain space before the colon. The row now uses U+00A0 there.
Open #8053 fixes three other rows that main already has right, so it
does not clear this failure.
With Link, File > Place now places an EPS file, a PostScript file and a
PostScript .ai as a linked placed document, but the Place dialog still
counted them as other files, so Link's tooltip did not say they become one
locked object, and the dialog test expected a PostScript .ai to be
embedded.
- `is_vectorcraft_file` counts an EPS, EPSF or PostScript file on disk, and
a PostScript .ai, as a document, and leaves out a DCS file, which is
placed as a linked image.
- Where the platform reads part of a file, it reads only the file's start
and tells a DCS file from it with `place::head_is_dcs` (the check Links
uses), binary EPS headers included.
- The dialog test now checks the .ai, .eps and .ps cases, the bounded read,
DCS files plain and behind a binary header, and a file named .eps that
isn't PostScript.
The rows of Select by Artboards and the Variables panel, and every
collapsible section header, reported their state through
`WidgetInfo::selected`. egui writes that value as the node's toggled
state for every role, so the accessibility tree showed these rows and
headers as toggled. AccessKit keeps a list item's selection in its
selected property and a disclosure control's state in its expanded
property.
- `widgets::list_item_info` gives a row the list item role and sets its
selected property, and both lists use it.
- `section_toggle_name` sets the header's expanded property, as egui's
own collapsing header does.
- Tests draw both lists and a section header and check the role and
state of each node in the accessibility tree.
The drag check took any line intersection kurbo reported, and kurbo also reports
one a tiny step before the start or after the end of a cubic. On a long curve that
step reached past the 0.0001 pt join tolerance, so a drag 0.0002 pt short of an edge
stroked it. Only intersections inside the segment count now; the checks on the
edge's ends still cover touches there.
With variation cells selected, the Save Color Group to Swatches button
now saves those cells as one swatch group, in grid order (row by row,
left to right, each cell once), named after the harmony rule, in one
undo step, each color in its own model. With no cell selected it saves
the harmony colors as before.
A cell selection now ends when the guide it was made in changes: the
base, the Color Guide Options, the variation mode, the harmony rule, the
library limit, or the colors the grid shows. Before, changing the
variation mode or the options kept the old cell positions selected, so
Save Colors as Swatches could save colors that were never picked.
With a gray between black and white, an edge pixel of black on white
took the black-and-white blend only when one of its eight neighbors lay
past the gray on each side and the flat black and white areas lay nearer
than the flat gray. On an edge blurred by a pixel or more neither holds,
so gray slivers lined black shapes: a black disc beside a gray square on
white traced up to 35 gray paths at blurs of 1 to 3 pixels.
The check now walks from the pixel along the line between the two outer
colors, up to 5 steps each way, each step to the neighbor that lies
farthest toward one of them while the pixels keep getting darker (or
lighter). The blend of the outer two lies as near as the farther of
their flat areas, or as the larger of the two step counts to a pixel of
each outer color when that is smaller. The first step is the old
neighbor check. The same disc and square now trace with one gray path
at blurs of 1 to 2 pixels. At 3 pixels, with the colors named, a gray of
128 is one path, a gray of 200 leaves 4 slivers with no area, and a gray
of 230 leaves 8 slivers of up to 21 pixels (14 gray paths before).
On edges blurred by a pixel or more, gray near black loses pixels. A
soft-edged gray band up to 4 pixels wide along black traces as black
and white at blurs of 1.5 and 2 pixels, and one up to 3 pixels wide at
blurs of 1 and 3 pixels. A soft-edged gray stroke 2 pixels from black
can lose some or all of its gray, and one 4 pixels away a few pixels. A
soft-edged gray stroke running out of black, blurred by 1 or 1.5
pixels, loses 3 or 4 of the 16 pixels nearest black. Sharp-edged bands
and strokes keep their gray.
Docs: docs/image-trace-adjustments.md, docs/target-app-parity.md.
A click on the isolation bar's empty space, or on the isolated object's
name at the end of the breadcrumbs, leaves isolation mode altogether, as
Exit Isolation Mode does, nested isolation included. The back arrow, the
breadcrumbs of the levels above and the pattern buttons keep their own
actions, and a drag across the bar does not exit.
While an opacity mask is edited the click stops editing the mask. In
symbol editing mode it leaves the mode, also from a group isolated inside
the symbol's art and together with the isolation the mode was entered
from. While a pattern is edited it does nothing; Save a Copy, Done and
Cancel end pattern editing.
Docs: docs/target-app-parity.md.
With `pdfs: "single"` and several assets, layers or selected objects
(`selection: "each"`), document.exportForScreens wrote one PDF named
after the document holding only the first item's art, and every other
item's PDF was left out. Single file puts artboards on the pages of one
PDF; each asset, layer or object is cut out of the document with its own
art, so the export now refuses that combination before it writes any
file, and the Example line refuses it too. `pdfs: "multiple"` still
writes a PDF of each item, and `selection: "one"` writes one PDF either
way.
Docs: params text, docs/mcp.md, docs/target-app-parity.md.
With the Selection tool, every Character and Paragraph field read its
value through selected_stories, which walked the selected objects and
looked up each type object's story again. With the default panels open
that was 24 builds of the same list per frame.
selected_stories and selected_story_texts now keep the last list,
with the document (a held Weak keeps its address from being reused),
its revision and a copy of the selected objects. A change to any of
them builds the list again. Type objects are still resolved from the
current document on every read, so the panels show the same values.
Tests compare the kept list with a fresh build after an edit, a
reordered or replaced selection, a selection set without a new
revision, a selected group and a switch to another document at the
same revision; compare what both panels draw and their field values
with and without the kept list; and count one build per frame.