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.
Two SVG import tests asserted elapsed time (1 s and 5 s), so a loaded
machine could fail them and a slower but still bounded run could pass.
- prepass.rs: a test-only counter adds up the numbers Edits::id tries
for a made-up id. The test asserts 55,000 tries for 5,000 ids made up
past 50,000 taken ones. With each id starting again at the number of
ids made so far, as before the fix it covers, the count is 237,507,500
and the assertion fails.
- entities.rs: the run of 1 MiB of `&` keeps its check that nothing is
expanded and drops the timing. The scan is craft_svg::guard in
craft-libs, whose own test checks the linear read.
main added a test named wrappers_go_stale_after_revert and passes the
command id to dom::before_command by reference.
- The revert test of this branch is renamed
objects_read_before_a_revert_are_stale_and_ones_read_after_are_the_loaded_ones.
- command_value takes `id` as a &str, so the call passes it as it is,
which clippy's needless_borrow check requires.
When a live-effect plug-in returned a piece whose effects list a raster
effect before a Transform effect that makes copies, the Transform effect
copied the bare geometry and the raster effect was drawn once around all
of the copies. dress_piece applied the piece's geometry effects to its
geometry alone and kept every raster effect on the group around them.
dress_piece now builds such a piece through copied_raster_art, as an
object's copies are built: each copy carries its own raster effects,
moved, turned, reflected and scaled with it. copied_raster_art takes an
optional budget and completion flag, so the piece still keeps to the room
it is given and is refused when its copies or its geometry effects would
stop short. The piece's fills and strokes keep their own effects for
their own stage.
In a realm with the ES2015 option, the `find` function of a reflection
had configurable `length` and `name` properties, so Object.isFrozen gave
false and a script could delete or redefine them. Both are now
non-writable and non-configurable, as the reflection's other parts are.
A round or projecting cap draws a dot for a subpath that never leaves
its first point: a closed lone anchor, or a line or curve back to the
same point. StrokeLayer::hits ruled the click out by the box of the
segments, which leaves out a closed lone anchor, and then measured
only segments with length, so a click on the dot missed. The fast
path for a plain centered stroke in hit_leaf also returned no hit for
a path whose only subpath is a closed lone anchor.
hits now measures each such subpath as the dot the stroke draws: a
disc for a round cap and an axis-aligned square for a projecting cap,
as wide as the stroke's body, on undashed strokes without a width
profile, which are the strokes that draw a dot. Inside and outside
strokes keep to their side of a closed path. Butt caps draw no dot
and still miss. The fast path hands a click near a closed lone anchor
to the full check.
Hover, Select Behind, Direct Selection and the Eyedropper go through
the same hit test, and a marquee over the anchor already selects it.
main added HostClass initializers in host_tests.rs without the reflect
`info` field, a second test named
assigning_undefined_to_the_selection_throws_and_keeps_it, and type and
size checks on DocumentPreset settings.
- host_tests.rs: the six new HostClass initializers give `info`.
- The selection test for an index past the end of pageItems is renamed
assigning_an_index_past_the_end_to_the_selection_throws_and_keeps_it.
- The preset heap tests used titles of 512 KiB and an array of 20,000
booleans as a title, which the setter now refuses. They now reach the
run's heap with 4,092-byte titles, and compare presets holding a
four-number documentBleedOffsetRect with presets holding an eight-byte
title, so each array element still counts.
main's #9357 grouped ui.pdfSummary.* under File and ui.runInstalledScript
under File > Scripts. On this branch a UI command whose params doc starts
{path} or {path: ...} needs a path, so neither is listed in Keyboard
Shortcuts, and commands_no_menu_holds_are_grouped_by_their_menu_or_panel
failed on the merged tree because those two GROUPS rows grouped nothing.
The two footer buttons open menus but set no popup kind, so the footer
drew no dropdown arrow under them and screen readers were not told they
open a menu. Both now call `.popup(PopupKind::Menu)`, as the menu
buttons in the Brushes, Graphic Styles, Symbols and library panel
footers do.
`panel_harness` gains `Panel::popup_kind`, which reads the popup kind a
control reports from the accessibility tree.
A geometry effect is given the object's box as its reference, for
example the center a Transform effect scales and rotates about. Drawing,
the preview bounds, Expand Appearance's first step, shape art, the
outline check of the .ai reader and a stroke's effects before a Transform
that makes the stroke a path of its own measured that box with kurbo's
bounding_box, which counts only segments. A lone anchor was left out, and
a path of one anchor measured a box at the origin, so it scaled about
(0, 0). PathData::bounds, which the selection's box, Align, Transform
Each and every later effect in the stack use, holds lone anchors.
- geom: anchored_curve_bounds measures a BezPath as PathData::bounds
measures the path it stands for.
- render, effects and the .ai reader give geometry effects that box.
Gradient reference boxes and clip regions are unchanged.
main moved the pen input onto the craft UI framework's PenSource, which
queues each reading and pairs the readings with a frame's pointer moves.
The web build now writes one reading per move, coalesced positions
included, with the wheel from Pointer Events' tangentialPressure, in
place of the StylusFeed moves the branch used before. The wheel rules
are unchanged: 0 reads as no wheel until the pen reports another value,
and another pen, the other end, a canceled press or a pen that left the
hover range reads it afresh.
The canvas-side pairing (frame_moves, StylusFeed::set_move) is gone on
main, so the branch's two ui-egui tests for it are dropped; the
vectorcraft-web tests check the readings written for each move.
The plug-in runtime keeps main's JavaScript plug-ins beside the web worker's module bytes and checked loads: a JavaScript plug-in's bundle is kept for the worker like a module, and load_checked loads it from its bundle.