VectorCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (`next`; the framework side is storytold/craft-libs#2809), as PhotoCraft's did. The app keeps its engine, document model, file formats, commands and automation; its windows, panels, bars, dialogs and canvas are now built and driven by the framework: shell, docking and panels, hosted dialogs, keyboard, focus, IME and pointer routing, and theme tokens.
About 264,000 lines of VectorCraft's own egui UI code are removed and about 154,000 added. craft-libs is pinned at bf62d509f (in `next`), the egui fork at f5025284.
Tests that drove the old UI were rewritten against the port where only their premise changed, with their assertions kept. The UI tests still failing at merge, and their follow-ups, are listed in the pull request.
Choosing a fill while the Shape Builder was active (a swatch, the Color
panel, the Fill box or a paint command) ran paint.setFill on every
selected path, so all of them took the color. With Pick Color From set
to Color Swatches the tool merges with the current fill, so the pick is
the color for the next merge.
While the Shape Builder is active, a fill chosen without ids, id or item
now changes only the current fill, with either Pick Color From: with
Color Swatches the next merge fills with it, and with Artwork merges
still take their look from the art. A stroke chosen then still goes to
the selection. Swap Fill and Stroke and Default Fill and Stroke change
only the paint for new art, and Swap gives the current fill the stroke
the Stroke proxy shows. This is VectorCraft's own rule; no default
setting changes.
- painting_tool_of says which tool paints with the chosen fill or
stroke: the Live Paint Bucket with both, the Shape Builder with the
fill. Session::tool_paints(stroke) replaces bucket_paints, so the
paint and gradient commands, previews, the proxies, the Stroke panel
and the Gradient panel's eyedropper follow it for each kind.
- A new selection does not replace the tool's fill for new art, with
New Art Has Basic Appearance on or off, and new art is not linked to
a graphic style whose fill it does not have.
- A cancel puts back a fill previewed for the tool, also after another
tool was chosen during the drag.
- An Eyedropper pick armed for a stop of the tool's gradient samples
only into a stop of that gradient, and ends once that stop is gone.
Choosing another tool drops the stop the pick was armed for, and a
pick armed while the Eyedropper waits for a Cmd-drag keeps its stop.
- The paint.freeform commands refuse the Shape Builder's fill as they
refuse the Live Paint Bucket's colors, which lie on no object. For
the gradient either tool paints with, the Color panel, the Gradient
panel, the stop popover and swatch drops edit its stops instead of
points, and the Gradient panel shows its Draw toggle, ramp and stop
fields in place of the point controls. paint.editGradient keeps the
given stops of a freeform gradient that has no points yet.
- A gradient command that names no kind edits the proxy in front when
the tool paints with it, else the kind the selection's active
Appearance row stands for.
- set_paint lists the commands that painted no object in unpainted.
- Params text and docs/mcp.md describe the rule.
Help (Pick Color From, Color Swatches):
https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/shape-builder-tool-options.htmlhttps://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=266https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=267
A Linked Images row now gives the image's format, its size in pixels, its
resolution at the size it is placed at and its file
(`PNG; 1200 × 800 px; 150 ppi — /art/photo.png`, both axes when they
differ, `resolution unavailable` when the transform leaves the image no
area). An Embedded Images row gives the format, the size and the estimated
memory of the 8-bit RGBA pixels the image is drawn from
(`PNG; 1200 × 800 px; estimated memory 3.7 MiB`). The format comes from a
linked file's extension, else from the type of the pixels the document
holds, and reads `Unknown format` when neither is known.
document.info's imageObjects entries gain format, effectivePpi,
memoryBytes and storedBytes (the encoded bytes an embedded image keeps).
The Document Info report and Package's report write the same rows, and the
panel shows them in the interface language, with the new templates in every
complete catalog.
The dialog keeps the lines it opened on as the command's ids, with the uid
of their document. OK changes those lines even when the selection changes
while the dialog is open, and changes nothing once another document is the
active one.
The split flap raster test now requires a flap at both samples: the right
flap at both, or the left flap's inner part at the near sample and its
outer part at the far one.
While the Live Paint Bucket is active, a paint or stroke command that names
no objects changes only the colors the bucket paints with. The journal
recorded the params as given, and the active tool is not journaled, so a
replay with the Selection tool active painted the selection instead.
The paint and stroke commands now take defaultsOnly: true, which keeps a
command without ids, id or item to the defaults with any tool active. When
the bucket routed a command, its journal entry notes defaultsOnly: true,
also when the params gave false. library.use (a color, gradient or pattern)
and swatch.library.add with apply note it too and pass it to the commands
they run.
- defaultsOnly is a bool. It is refused with ids, id or item, and in
stroke.setAdvanced with brush.
- With New Art Has Basic Appearance off, new-art inheritance does not
replace the defaults after such a command, unless a later step of a batch
selects another first object or changes its appearance.
- A preview with defaultsOnly: true, and the one after it, starts from the
defaults the interaction began with, and a cancel puts them back.
- paint.sampleColor with a stop and defaultsOnly reads the default's
gradient.
Test: live_paint_bucket_commands_replay_from_the_journal_with_another_tool
(engine). Docs: docs/mcp.md, the Live Paint Bucket paragraph; params text
of each command.
Set Fold Angle… (Object › Plug-ins › Packaging Tools) gives the selected
fold lines their own fold angle, from -180° to 180°, in place of their
role's 90° away from or toward the print, to the millionth of a degree;
reset: true takes it away. The angle is kept in the line's data under
vc-fold-angle, which native files and SVG with Preserve Editing keep and
plain SVG export leaves out of the path's attributes. A line keeps its
angle when it is given another role. The Fold Lines panel shows a Fold
Angle field for the selected lines it can change, empty when they
differ, and a Reset button.
- addon.packaging.setFoldAngle is one undo step, none when nothing
changes, and is dimmed while the selection holds no Crease, Partial Cut
or Perforation line that is neither locked nor hidden. An angle stored
as other text for the same number counts as unchanged.
- addon.packaging.roles also returns foldLines, foldAngle, ownAngles and
storedAngles for the lines Set Fold Angle can change, which are none
while nothing is selected.
- A hinge folds at the angle of the line with the most length in it,
counting a line the planar map splits into pieces whole and a line's
subpaths on top of each other once; among lines of equal length the
lowest id wins, in any line order. Before, it took the role of its
longest piece, so a hinge whose lines have different roles can now
fold the other way when a split line is the longer one.
- Fold Preview: a panel folded flat onto another (180°) is drawn behind
that panel's printed side, and at -180° in front of it; a flap folded
back over a folded panel lies between it and the panel before; a 0°
hinge keeps its panel level with its parent. Panels in one plane keep
their order when the panels they fold from are seen edge on, and a
panel that comes round onto another's plane lies on the side it came
from. Only panels in one plane stack by these rules; panels in
different planes go by depth, so folds a hair short of flat stay in
order wherever the blank lies in the document. The stack is worked out
from the blank's largest panel whichever panel the window folds about,
so a double-click on another panel moves the blank without changing
which panel shows. Panels that 90° folds bring into one plane, such as
a carton's closing flaps, now stack by these rules too.
- Set Fold Angle…'s dialog keeps the angle within -180° to 180° as it is
typed, as the panel's field does. Both show every decimal place the
angle has. ui.menuDialog opens the dialog for
addon.packaging.setFoldAngle, and gives the command's reason while
the selection holds no line it can change.
- Set Fold Angle skips a locked or hidden path of a compound path that is
named by id or selected without its compound. addon.packaging.setRole
(Make Cut Line and the other Make ... Line items) now skips it too;
before, it changed the whole compound.
- Folding: a hinge whose middle falls in a cutout turns its panel by the
side its parent lies on next to the hinge's own pieces, not by a point
anywhere inside the parent, which folded a panel the wrong way when
the parent also ran on past the hinge.
Docs: docs/mcp.md (Fold angles), ROADMAP.
Keep consumed releases separate from fresh canvas presses, use click release positions, share the engine trace target selector, reject source misses before sampling, and return from the temporary tool without fresh activation.
With a Live Paint group selected and the Live Paint Bucket active,
choosing a fill color (a swatch, the Color Picker, the Fill box) painted
the whole selection, so every face and edge of the group took one color
before the bucket painted anything.
While the bucket is the active tool and no ids, id or item are given:
- paint.setFill, paint.setStroke, paint.none, paint.lastColor,
paint.lastGradient, paint.editGradient, paint.invert,
paint.complement, paint.swap and paint.default change only the
defaults, the colors the bucket paints with, and record no undo step;
- stroke.set, stroke.weightUp, stroke.weightDown and stroke.setAdvanced
(without a brush) change only the stroke for new art;
- the Fill and Stroke proxies, the Stroke panel and its Profile list
follow those defaults, as they do with nothing selected;
- New Art Has Basic Appearance off no longer copies the selection's
appearance into them after a command;
- canceling a Color Picker preview puts the bucket's color back.
Window › Retype shows a panel that lists the fonts whose glyphs the
selected outlined text exactly matches. Find Matching Fonts lists ten,
ranked by how many shapes each matches and then by how closely, and
Find more font matches adds the next five from the same search. Each
row shows a sample in the font, at the size the panel menu sets (Small,
Medium, Large) and with the text typed in the panel. A click on a row
sets the font on the selected live type. Reset Retype Panel clears the
list.
- type.retypeFonts {count?} returns the ranked fonts without changing
the document. It compares shapes with the glyphs of up to 96 loaded
fonts, those of the document's live type first, by type.retype's
matching. A shape counts once for each font it fits. Of two loaded
versions of a font, only the version its name gives is compared.
- RetypeIndex::all_matches returns every fit of a shape, so fonts past
the first 16 fits are ranked too.
- retype.find, retype.list, retype.preview and retype.reset drive the
panel.
- Rows for the panel's labels and the commands' errors in every
complete catalog. The Retype row also translates the Type › Retype
menu item.
Docs: docs/mcp.md (Retype panel), docs/target-app-parity.md,
docs/ui-parity.md, docs/gaps.md, docs/type-parity.md.
Part of #4934. Builds on #8441.