Transform Each recorded only the document's uid when it opened. Object
ids survive File > Revert, so after a revert the dialog previewed its old
values on the restored selection, and OK or Copy applied them there.
The dialog now records the document's uid and revert count, as the
Transform dialogs do since #9797. After a revert, Preview stops, Cancel
rolls nothing back, and OK and Copy are refused with "The document was
reverted. Reopen this dialog to continue." in the dialog and on the
status line. A refused OK now sets Copy to off instead of removing the
field, so the dialog keeps showing the reason.
File > Revert keeps the document's uid and restores objects with the same
IDs, so an appearance dragged from a Layers target circle or the
Appearance panel's thumbnail before the revert was still accepted after
it, and its drop ran on the restored objects.
PanelDrag::Appearance now carries the document's revert count next to its
uid, as PanelDrag::Art does, and appearance_for(uid, reverts) returns the
source only while the destination shows the contents the drag came from.
Every drop compares the pair: a Layers target circle, the Layers trash,
the canvas (where it takes the drop and where it applies it) and the
Graphic Styles panel.
File › Open and File › Place read layered raster .pcraft documents
through craft-doc and store them as one PNG, sized by the document's
resolution. A placed file links like any image.
- The image is the file's full-size composite when it has one.
- Without one, the layers are combined at the canvas size when the
document is RGB at 8 or 16 bits and every visible layer is a raster
layer that blends Normal, with no clipping, layer effects, vector
mask, frame, advanced blending or feathered layer mask. Hidden layers
are not read, and an RGB ICC profile the document names is kept.
- Otherwise the composite preview comes in at the canvas's size, and
Open, Place, links.update, links.relink and links.replaceEmbedded
warn when it has fewer pixels than the canvas, naming both sizes and
why the layers were not combined.
- A full-size composite or preview the file names but doesn't hold,
can't decode or, for the full-size one, of another size than the
canvas is an error. The Links commands decode the kept PNG before
taking it.
The import fuzz tests cover mutated bundles and manifests.
The selected paths a hover tries were listed group by group in selection
order, while a press tries them topmost first across the document. With two
selected groups whose anchors fall within reach, hover marked the back
group's anchor and a press took the front one. The list is now sorted in
paint order, topmost first, with a Shaper Group's original shapes included.
The Corner menus of a live rectangle's properties (one for all four
corners while Corner Radius is linked, one per corner otherwise) read
the select's current value, so a kind highlighted with the arrow keys
in the open list ran object.setLiveShape at once and recorded an undo
step, and Escape left the highlighted kind on the rectangle. The menus
now read only the committed pick, as the Corner menu of Direct-Selected
corners does since #9728. The rows are shared by the Transform panel,
the Properties panel's Transform section and the Contextual Task Bar.
The progress line now names the cases where a placed EPS file whose bytes
the editing data includes stays as on main: DCS bytes, no bounding box of
its own, a VectorCraft document, bytes that don't read as EPS, an `.ai` or
`.ait` file name, and a previewed file that an image variable binds.
A template layer stays in Preview whatever its Preview flag is, so only a
layer that is not a template and has Preview off draws placed files by the
Outline rules in Preview mode.
A command with no menu path whose params name a required field (Close
Path needs an `id`, Knife needs `points`) was still listed, and a pick
of it always failed with an error such as "missing id". The rule that
leaves out commands needing a value now applies to these commands as
well as to menu commands, so 232 more engine commands are left out (562
in all, up from 330).
Rename Artboards and the Remove Asset, Rename Asset and Set 3D Format
commands stay listed: a pick of each opens the Rename dialog or the
Asset Export panel.
Four EPS import tests asserted elapsed time (5 s, 20 s, a 20 s receive
timeout, and 1,000 copies against 5 times one copy). A busy test runner
could fail them, and a slower run that was still bounded could pass them.
Each now reads a test-only counter on its own thread:
- `]` without its `[`: the operand stack slots that `[` and `]` look at.
200,000 brackets look at no more than 4 slots each.
- The outline check: the point-to-segment distances it works out. A look
drawn 5,000 times works out no more than `MAX_OUTLINE_PAIRS`.
- Objects on a path: the paths and objects the records measure. A
thousand copies of a record measure as many as one copy.
- File fonts: the glyphs `fits` compares. A string of 250,000 of one
character makes fewer comparisons than it has glyphs.
Outside tests the counters do nothing.
View › Proof Colors, Overprint Preview and Separations Preview are one view
for the whole process, and the canvas draws through it. Canvas tests hold
`testing::DefaultProofView` to keep it fixed while they compare frames, and
`testing.rs` asks every test that sets the view to hold it too. Three tests
changed it without holding it:
- `panels::actions::tests_edits::every_listed_menu_item_runs_from_the_menu_what_its_step_holds`
and `shortcut_editor::tests::listed_commands_run_from_a_key_without_a_missing_param`
run every listed command, the View menu's proof commands included.
- `dialogs::new_document::tests::new_document_choice_enter_commits_before_create`
creates a document with Preview Mode set to Overprint, which turns on
Overprint Preview and leaves it on.
When one of them ran between two frames of a canvas test in the same test
process, the render options of the next frame no longer matched the frame
shown. An edit then rendered the whole frame instead of drawing its part, and
`canvas::tests::without_a_worker_edits_while_the_view_is_still_do_not_hold_off_the_render`
failed with "rendered whole about STILL_SECS after the view stopped: 1 frames".
Turning Overprint Preview on between two of its frames gives that failure
every time.
Live envelopes, warped type and warped images were held to one shared
difference budget measured only on the first artboard. A file whose PDF
part shows a later artboard, a page cropped to the art, or more than one
artboard could then take more difference on that page than the page
check allows, and open from its PDF part instead of its layers.
Each page the art may be compared with (every artboard, and the art's
bounding box when it is not one of them) now has its own half share of
the page check's allowance. An envelope on a later artboard that draws
away from its drawn art over that artboard's page keeps its drawn art,
where before it opened live. Art on no such page is not held to a page.
Repeated pages are held once, the page list is worked out once per
change of artboards, and an import makes at most 1,024 comparisons with
pages; art that needs more keeps its drawn art.
The Batch dialog's lists wrote the row the arrow keys highlighted into
the dialog's fields. Escape closed the list but kept that row, and OK
then ran the batch with it. The lists now bind to the fields, so Escape
restores the earlier choice and only a committed choice applies, as
New Action and Action Options do since #9730.
Assigning a profile to the front document changes the process's active
color settings (`cms::active`). The status bar readout test assigned
ProPhoto RGB, and the Separations Preview Assign rows test assigned other
RGB and CMYK profiles, in the shared test process. A test that converted
a color while either profile was active got that profile's values: under
plain `cargo test`, `an_artboard_shows_its_background_color_live` read
sRGB red as #b3461a, its ProPhoto RGB value.
Both tests now start with `testing::in_own_process`, as the crate's
other tests that assign profiles or change Color Settings do, and that
helper's doc names these cases.
A .ai file's editing data can include a placed EPS file's bytes between
%%BeginDocument: and %%EndDocument. The reader did not read those bytes:
in the %AI5_BeginPlace form the placed file showed only the preview the
data keeps of it, or an unread placeholder box without one, and in the
version 7 form the art the file draws came in as editable paths with a
note that placed files weren't read.
- The reader keeps those bytes (up to 256 MB) and makes the placed file a
placed document of them, in the file's bounding box where the
matrix puts it. It draws its art whether or not its file is found, and
a native save keeps the bytes. The version 7 form's placed EPS art is
no longer editable on open.
- A placed file stays as before when its bytes are a DCS file (File >
Place makes those linked images), have no bounding box of their own,
carry a VectorCraft document (as VectorCraft's EPS export writes),
don't read as an EPS file, or belong to a file named .ai or .ait.
What reading the bytes warns of is in the open result.
- One with a preview that an image variable binds stays the linked image
showing its preview, as a placed PDF page does.
- The link takes the size and hash of the bytes, so a file found unchanged
is neither missing nor modified.
- Drawing and the open check each read at most 8 placed EPS files inside
one another, so a file whose included files include others opens.
The open check draws the placed documents inside the bytes from their
previews, and it reads each included file once at each depth. A file
nested 12 levels deep opens with at most 8 drawing reads and 72
checks.
- File > Package with Copy Fonts reads the type of a placed EPS file, as
it reads a placed PDF page's, and of the EPS files it includes in turn,
pattern art included.
- On %_ lines the %_ that starts each line is taken off. Then one line
end is taken off the end of the bytes when another line end comes
before it: the one the %%BeginDocument: line ends with when the bytes
end with it, otherwise the last one. An LF after a CR is kept with it
when the file's first line ends with CRLF.
Docs: docs/target-app-parity.md.
The Outline view row in docs/ui-parity.md said Preview mode draws linked
images and placed documents as before. On screen, a layer whose Preview
is off draws in outline in Preview mode, so its placed documents are
crossed and its linked images show their crossed frames. A template layer
in Outline mode draws them as Preview mode does. The row now says so.