Cause of the CI failures on 212090fd7a:
- main's dialogs::new_document test a_presets_rows_reach_the_document_create_makes
sets artboardLayout.rows to 3.6 and expects 4, but this branch refused a
rows value that was not a whole number. rows now rounds like columns and is
still refused outside 1 to 1000.
- script_host_vs_scriptcheck listed Document.prototype.pathItems=, the
setter of main's placeholder. This branch makes pathItems a read-only
collection, like pageItems, so the row goes.
- PathPoint.remove() renumbers the direct-selected anchors and segments
after the removed point, and drops the removed anchor and the selected
segments it ended, through selection commands after the points are
written. A removed anchor no longer stays selected, and the same index
no longer selects a different point.
- pathItems.add() reads new art's paint after the target document is
active, so a path added to a document in the back keeps the stroke
that document's selection gives new art.
- Paths a script draws put new art's paint back afterwards, so a
defaultStrokeWidth the script set applies to every path it draws, not
only the first.
- appearance.setNewArt refuses a fill or stroke paint with a setting a
paint does not take, such as opacity, instead of applying the rest.
Cause of the script_dom and script_dom_paths failures: main's 9872e6b679
("page items report their own members, and lists start with the topmost
object") made pageItems, pathItems and the selection list art topmost first.
The branch's tests still indexed the objects bottom first, so pageItems[1]
and pathItems[0] named the other object. The tests now make the objects in
the order the lists read them, and index them topmost first.
The own-members test asked about rotate, which this branch makes available,
so it now asks about transform, which is not available yet.
The fallback test for addDocument relied on five 1,000,000 pt artboards not
fitting, but a new DocumentPreset puts them in one column. It now unsets the
layout so the built-in preset puts them in one row, and the test fails when
addDocument falls back to the saved preset of the same name.
PathItem handles carry the document's revert count, as page item
handles on main do, so path members find their path again.
setEntirePath and the path point setters throw a RangeError for a point
off the canvas. Opening a path whose closing segment is selected keeps
the edit. pathItems.add() leaves new art's paint as it was with New Art
Has Basic Appearance off. addDocument reports settings the built-in
preset refuses. appearance.setNewArt refuses a swatch that is not a
name. Writing one path's points looks only at that path afterwards.
With an object of a dynamic symbol instance selected by Direct Selection,
transparency.set without ids changes that object's opacity and blend mode
for the instance, and the Transparency panel shows those values. The
transparency.info command still reported the instance's own opacity and
blend mode. Without ids or id it now returns the panel's values
(Session::transparency_info), so it reports the part's opacity and blend
mode with the instance's isolate and knockout. With ids or id it still
reports those objects.
A sliver at 0% opacity, or inside a group or layer at 0% opacity, paints
nothing, so Clean Up and Select > Object > Hairline Slivers now skip it.
The params text and docs/mcp.md say so, and docs/mcp.md also names what a
group or compound path used as a clipping path holds among the objects
both commands leave.
With one object selected, the canvas highlights the objects Start Global
Edit would take. After every edit the engine reduced each candidate in
the document to its form again, measured its bounds twice, and made the
outline of each highlighted object again.
The forms, bounds and outlines are now kept by node between calls. An
edit replaces each node it changes, so after an edit only the replaced
nodes are measured again. Bounds of objects that hold symbol instances
are not kept. The outline pass finds each object, its selected ancestors
and its layer color in one walk down its index path.
The new test counts the forms and outlines made: 40 and 39 for the first
preview of 40 squares, then 1 and 0 after the selected square moves.
script.run's params text now says what app.undo() and app.redo() do. The artboardLayout messages,
their test and their catalog rows go back to main's text; they belong to file.new rather than to
script history.
main's item_rect now gives no bounds for an empty object, and the
Live Paint Bucket check became tool_paints for the fill and the
stroke. rotate and resize leave a path without bounds unchanged, and
appearance.setNewArt uses the same inheritance test as paint.rs.
With Use Preview Bounds on, dragging a bounding-box handle with the
Selection tool, a shape tool or Free Transform lined up the outside of
the selection's stroke with the other art's geometric bounds, which
Smart Guides use for the targets. A stroked object then stopped half a
stroke short of the edge it showed a guide for, the same mismatch moves
had before.
- The handle still drags the visual box, and the edges of the
selection's geometric bounds line up with the targets and with even
spacing. The margins between the two boxes keep their size unless
Scale Strokes & Effects is on, when they scale with the box. Snap to
Grid and Snap to Pixel still use the bounds the box shows, and the
Slice Selection tool is unchanged.
- Tool contexts carry the Scale Strokes & Effects preference.
- New tests drag the right-middle handle of a rectangle with a 20 pt
stroke toward another rectangle with the Selection tool and with Free
Transform.
Part of #6436