The box an envelope maps from measures a group or layer that holds type
member by member, so that type is measured by its glyph outlines. In that
walk the container's own strokes still grew every member's box by
Appearance::outset(), the farthest a miter-joined stroke can reach. A
10 pt stroke of the group's own round a square next to type reached 50 pt
past the square instead of the 5 pt it paints.
The walk now measures the container's strokes, scaled into the envelope's
frame, along each member as the group's visual box does: paths and
compound paths along their shapes (Node::painted_by_container), groups
holding type member by member, and nothing round hidden members and
guides. Type, clip groups and compound shapes keep their box grown by the
strokes' reach, with their own strokes scaled into the frame.
A scatter brush takes a Saturation Jitter amount from 0 to 100 percent (0
by default). Each copy moves the saturation of its solid fills and
strokes, type included, by its own amount up to that many points either
way, after the colorization and the hue jitter. The amounts come from the
stroke's path and the brush name, drawn apart from the hue jitter's, so a
stroke draws the same colors on every redraw, after Save and Open, and in
export, and turning it on does not change the hue jitter's amounts.
A color keeps its hue and brightness and moves in its own model: RGB in
the HSB of its values, CMYK over C, M and Y with K kept, Lab by moving its
chroma with its lightness and hue angle kept (a and b stay within 127).
The saturation stops at none and at full. White, black and grays stay as
they are. A brush at 0 saves no saturation_jitter key; a brush without
the key reads as 0.
- brush.options takes saturation_jitter, and brush.get shows it for every
scatter brush. Brush Options shows a Saturation Jitter field
(ui.brushOptions field saturationJitter).
- Hue and saturation jitter share one per-copy recolor step, which takes
a salt and a color adjustment.
- Options of Selected Object showed Hue Jitter but dropped a change to it
on OK, since a path could not set it for itself. A path now sets its own
hue_jitter and saturation_jitter (brush.objectOptions).
- The .ai editing data writer does not write the amount, so such a brush
is left out of the Brushes panel there and reported.
Docs: docs/mcp.md, docs/target-app-parity.md.
The dialogs' target held only the document uid and the selected slice
ids. File > Revert keeps the uid, and the restored file gives its slices
the same ids, so after a revert and a reselect, OK applied the old draft
to the restored slices. The target now also holds the document's revert
count, and OK after a revert leaves the document unchanged and shows
"The document was reverted. Reopen this dialog to continue." on the
status line, as Character Style Options, the Transform dialogs and
Create Object Mosaic do.
Where no background worker starts (and on the web), schedule makes the
bitmap on the drawing thread. A panic there left the bitmap pending, so
wait_idle, which has no time limit, could wait for it forever. That path
now does what the worker does after a panic: it marks the bitmap failed
and stops it being pending, then lets the panic go on to the caller.
expand_to took in the target without checking that it is editable, so a
locked or hidden object inside a selected group replaced the group with
its contents. It now leaves the selection unchanged for such a target.
select.anchors with mode toggle decided whether a path was selected whole
from the rest of the selection, so after a Shift-click had opened a group,
a Shift-click on an anchor of another path in it selected only that
anchor. A toggle on a group member now decides it from the member's own
selection; paths directly on a layer keep the existing rule.
The Three-Point Arc tool gets two options in its Tool Options:
- Join to Open Path Ends (`join`, off by default; J switches it while
the ends are placed): an end placed within 5 screen points of an end
of an open path lands on it, and the arc is joined to that path. The
path keeps its look and, when one end joins, its direction. With both
ends on open path ends the two paths become one, or the path closes
when both are its own ends. It is one undo step.
- Snap Where the Arc Continues a Path (`tangentSnap`, on by default): in
direction mode, when the direction line starts on an end of an open
path, a third point near the line along which the arc carries the
path on, the same way or turned back, snaps onto it, and the tool
shows the line dashed.
`shape.threePointArc` takes `join: true` for the same join; it picks a
path in the selection first, then the front one, and in isolation mode
only paths inside the isolated group.
The Parametric Shape panel read Shape, Count, W, H, Rotation, the kind's
own values and Corner Radius with value(), which carries each proposed
value but not the value a cancel restores. With no shape selected, a W
typed and then canceled with Escape stayed as the tool option, so the
next shape drawn had the canceled width. With a shape selected, each
keystroke was its own undo step and Escape left the shape edited.
- With a shape selected, each field's gesture runs in one undo scope
(EditPath::Scope, as the Live Shape panel's fields do): Enter keeps the
edit as one undo step, and Escape reverts it.
- With no shape selected, the fields send the value they land on
(events.landed(), as the Corner and Shared Edge sections do since
#9773), so Escape restores the opening tool option.
- With no shape selected, a highlighted Shape entry applies only once it
is chosen: a new kind resets the kind's own count and values, which a
restored kind would not bring back.
- A field left empty still ends its gesture, so its undo step closes.
Docs: docs/mcp.md (Parametric Shape Tool), docs/ui-parity.md.
path.moveAnchors with dx and dy both 0 (omitted, null or 0) ran the edit
anyway and added a Move step that changed nothing. It now returns before
the edit, as object.nudge does for a move by 0, and its params text
says so.
layer.setProps with no options, or with every option a row already has,
added a Layer Options step that changed nothing. It now applies the
options to a copy of each row first and records no step when no row
changes. As object.setProps does, a call that hides, locks or makes a
template still deselects the art that is no longer editable.
The Command Palette test that checks what a pick of a left-out command
does no longer skips the two commands.
Create Object Mosaic refused an image changed by Perspective Distort or
Free Distort. It now places each tile's cell of pixels between the
image's corners through the image's projective map, so the tiles are
four-sided shapes that follow the perspective. A new size scales them
from the top left of the image's bounds, as it does for any image, and
the spacing and Use Ratio measure a pixel by the mean length of the
image's two sides along each axis. Plain images are tiled as before.
Docs: docs/mcp.md (Create Object Mosaic and the distorted-image
paragraph), docs/target-app-parity.md.
Buttons, static texts, edit fields, drop-down lists, sliders, progress
bars and radio buttons were drawn at their own size inside their place,
so a button given a larger preferredSize or bounds stayed small, and a
control larger than its place ran over the next one. They are now drawn
at their place. A check box is still shown in the flow of its place,
which draws its text after the box.
effect::tests::failed_and_missing_stages_are_deferred_with_their_reason
installed a plug-in that runs to the default instruction budget (about 51
million instructions for its input) inside a first view, whose budget is
2,000 ms of real time. Under heavy CPU load the run took longer than that,
the view's budget cut it short, and the stage was deferred for time
instead of as failed, so last_error was empty and the assertion at
effect.rs:722 failed. With the test pinned to one core beside 15 busy
loops it failed 3 runs of 3 that way.
The test now gives the plug-in a budget of 100,000 instructions, so the
run ends in an instruction-budget failure long before the view's budget
runs out, and it checks that the error is the instruction budget. The
same test passes 5 runs of 5 beside 15 busy loops and 5 of 5 beside 100.
The new apps/vectorcraft-thumbnail-handler crate builds
vectorcraft_thumbnail_handler.dll, a thumbnail handler (IThumbnailProvider
with IInitializeWithStream) for .vectorcraft, .drawcraft and .vctemplate
files. Explorer passes it the file's bytes. It writes them to a file in
%USERPROFILE%\AppData\LocalLow\VectorCraft\Thumbnails (the temp folder when
that can't be made), runs `vectorcraft-cli thumbnail --size N` from the DLL's
folder on that file, and returns the PNG as a top-down 32-bit bitmap with
premultiplied alpha, at most 1024 pixels on its longer side. A file larger
than 256 MiB, a failed run, or a run longer than 25 seconds returns an error,
and Explorer shows the file's icon. Explorer gives the handler the file's
bytes and not its path, so a linked image found only relative to the
document's folder shows the preview saved with it.
`regsvr32 vectorcraft_thumbnail_handler.dll` registers the handler for the
current user under HKCU\Software\Classes, and `regsvr32 /u` removes the class
key and each extension's ShellEx key that names it. The Windows packages do
not build, ship or register the DLL yet.
The COM code is Windows-only and has a module-scoped unsafe_code allowance.
The registry values, the stream limit, the PNG conversion and the
vectorcraft-cli run build on every system, and their tests run in CI.
A group's or layer's visual box grew by Appearance::outset(), the farthest
any of its strokes can reach from any path. For a miter-joined stroke that
is the miter limit times half the weight, so a 10 pt stroke of the group's
own round a square measured 50 pt past it instead of the 5 pt it paints.
The container's own strokes are now measured along each member path and
compound path, at any depth in its groups, as a path measures its own
strokes (Appearance::stroked_bounds). They add nothing round hidden members,
guides, images and symbol instances, which they do not paint, and grow the
box of other members (type, clip groups, live objects) by their reach as
before. visual_of_members keeps the old growth for callers that have only
boxes at hand.
The box of a group measured in a turned frame (Node::bounds_in) and
object.setBounds with Use Preview Bounds, which measures plain groups member
by member and symbol art object by object, measure a group's own strokes the
same way, so the size setBounds gives matches the visual box. There, too,
the strokes stop at hidden members and guides, and setBounds measures a
compound shape as one object, as its visual box takes it. A group's
own beveled or mitered stroke along a path with slanted segments now counts
as a slanted stroke corner (Node::has_slanted_stroke_corners), so setBounds
measures such a group as drawn when it sizes it out of proportion.
art_changed compared only the strokes a path paints, so a dimension placed before the path was made into a guide kept measuring its stroke, and one placed on the guide kept the bare size after Release Guides. A change in guide state now counts as a change to the art for a Use Preview Bounds dimension of a whole path.
A double-click on the Normal style's row, or Style Options... in the panel
menu, now opens Character Style Options or Paragraph Style Options on it.
The Character Styles panel treats [Normal Character Style] as a base
style (craft-libs#3629), so it also takes Duplicate and Redefine, as
[Normal Paragraph Style] already does. Style Name is disabled for a
Normal style, and charStyle.edit and paraStyle.edit refuse to rename
one. The first edit of a Normal style that was never redefined gives it
a definition, and the type set in it takes the new attributes. The help
page on the default font for new documents changes it this way:
https://helpx.adobe.com/illustrator/desktop/design-with-text/fonts-and-scripts/change-the-default-font-in-illustrator.html
File Revert keeps a document's uid, so a selection-square drag started
before the revert still matched the document after it, and dropping it
on another layer moved the restored objects with the same ids. The drag
now carries the document's uid and revert count, as the Layers panel's
row drags have since #9746, and both the drop target and the drop
command compare the pair.
Each thumbnail test now writes its documents and PNGs into its own
tempfile::TempDir, which is removed when the test ends, instead of a
per-process folder in the temp folder that was never removed. The
progress-doc line now says the tests cover everything but the
20-second limit.
Main gave every class member a reflect type and page item handles a revert
count. The type classes now declare a type for each member, their members
that are not available yet use the unavailable form, TextFrame takes main's
contentVariable, and a text range looks its frame up at the document's
current revert count.
Review fixes:
- A text range length that ends inside a surrogate pair moves its end out
to the end of the character.
- textFrames.removeAll() refuses type on a locked artboard, as
pageItems.removeAll() does.
- Joining a story's text across its frames counts toward the run's data
limit.
- A test shows a script that catches a refused link goes on with the links
unchanged.
A path made into a guide paints no strokes, but painted_box still measured its
stroke, so a Use Preview Bounds dimension of a whole guide reached past its
outermost points. painted_box now returns None for a guide, which covers both
preview_extents and reach. The parity note says W and H match only when the
path has no geometry effect, in line with docs/dimensions.md.
Keeping every distinct flat-area color made each lookup scan the whole
list, so an image with many slowly varying flat colors cost pixels times
colors. Each class's colors now sit in cells 2 * PURE wide on each
channel, and a lookup checks the pixel's cell and the 15 neighbors on the
sides it lies nearer. A test compares the lookup with a scan of every
stored color.
File > Place with Replace refused an image changed by Perspective Distort
or Free Distort. When the placed file is a raster image or a DCS file, the
new image now takes the old image's corners in one undo step: its pixels
fill them, its transform is the old one scaled to the new pixel size (as
Update Links scales it), the clipping path a PSD, PSB or DCS file names is
drawn through the corners, and a PSD file's slices cover their part of the
pixels where the corners put it. Vector and document files are still
refused; text is placed by the bounds as before.
Rename Button now opens through the craft UI framework: the dialog is a
hosted parameter dialog like New Toolbar, its OK is held while the label
is refused, and an OK after switching workspaces is refused. The button
context menu item and the button face use the framework Menu and Button;
the face paints the label of its own while the accessible name keeps the
command name after it. Tests drive the dialog through panel_harness.
area_colors kept a flat-area color only when no stored color lay within
PURE / 2 of it, while near_area_color matches within PURE. A color dropped
that way took its PURE neighborhood with it: with flat areas of 222 then
223 under a class named 228, 228, 227, a pixel of 225 lies within PURE of
223 but not of 222, and lost its class membership. Keep every distinct
flat-area color per class instead, and add a unit test for that case.
object.setLiveShape rewrote only the path after a new Rectangle, Ellipse
or Polygon Angle, Polygon Radius, Side Length, Make Sides Equal, Line
Length or Line Angle, so a linked opacity mask, placed gradients and
pattern tiles stayed where they were. The edit now applies the transform
between the old and new shape to the object, as object.scale and
object.rotate do, and then sets the new shape. Scale Strokes & Effects
and Transform Patterns come from the new `strokes` and `patterns` params
or the preferences. Corner radii in the mask keep their size, an object
named twice moves once, and the bounding box keeps its angle.
Transform Patterns is now noted in the journal when only the art of a
linked opacity mask uses a pattern, so a replay of object.move,
object.scale and the other transforms moves those tiles alike.
The Polygonal Lasso Tool joins the Lasso group in both shipped
toolbars, after the Enclosing Lasso, and stays in Object › Plug-ins ›
Polygonal Lasso. The All Tools drawer lists it once, under Select,
instead of under a heading of its own, and Edit › Keyboard Shortcuts ›
Tools lists it once. It has no default shortcut, and the Lasso keeps Q.
A toolbar the user already edited keeps its saved layout; Reset Toolbar
adds the tool. A Lasso group torn off the Tools panel shows it too.
The Enclosing Lasso moved the same way in #8333.
object.distort gave type and symbol instances the warp's affine
approximation at their center, so their corners missed the handles.
They now keep their art and are drawn through the warp, composed after
any projection they had, as type and symbols on the Perspective Grid
are. Corners that would fold the box, cross the warp's horizon or lie
too close together for a perspective map are refused with an error that
names the object.
Images in the art of a symbol drawn through a projection now have their
corners placed by it, and their linked masks are projected with them.
Before, they stayed flat while the rest of the art moved.
The list box counted its rows at 18 pixels each, while the list draws
each row at the theme's control height, so a list box ran past its
place and over the control below it, which then took clicks meant for
the list's last row.
- Adding a control or an item, and removing items, builds both arrays
before the first write, so a run that ends at the heap limit leaves the
lists and the dialog's counts as they were.
- A listener registered after an event started does not hear it in a later
phase, a capturing container's re-registration included.
- show() reads the dialog again when a getter changes a list item's text
after the item was read.
- Enter and Escape skip an OK or Cancel button inside a hidden or disabled
container.
- A resource string of a name and a type without braces throws a
SyntaxError, and a \u escape pair of surrogates reads as one character.
- In the app, queued events wait while another dialog is open over the
script's dialog, and the run's own questions wait while a popup, such as
an open drop-down list, is over it. ui.dialog.confirm and
ui.dialog.cancel take only the dialog, ui.dialog.set needs a field or an
action and answers with the dialog it set, and OK is refused while a
dialog open over it waits. A cancel after typed text clicks the cancel
button the dialog has when its turn comes, and an immediate cancel the
run refuses is an error.
- A click on a list box row gives the list the keyboard focus.
- The vc hint test names BridgeTalk, since Window now exists; the params
text and docs/mcp.md say that a show() in a handler notify runs throws
only in the app, and define_script_ui says when end is not called.
Scribble's Settings menu, the Texture menu of Glass, Texturizer and Rough
Pastels, and Radial Blur's Blur Center box and Horizontal and Vertical
fields read their control's latest proposed value, so a value the arrow
keys highlighted in an open list, or a drag or typing that previewed a
change, stayed in the dialog and the live effect after Escape or another
cancel. These rows now read `events.landed()`, as the Adjust rows do.
- Settings keeps the rows from the start of the open list and puts them
back on a cancel, since Custom rows match no preset that could refill
them.
- Blur Center holds the exact value a drag or typing proposes while it
runs and rounds only a committed value. A rounded value ended the
point's drag after its first move, and a cancel now restores a stored
center unrounded.
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 deb, rpm and tar.gz packages install
share/thumbnailers/ai.storyteller.vectorcraft.thumbnailer for
application/x-vectorcraft and application/x-vectorcraft-template. It runs
the new `vectorcraft-cli thumbnail --size N IN OUT`, which opens the
document as the app does and writes an 8-bit RGBA PNG of the first
artboard, N pixels (1 to 1024, default 256) on its longer side.
A file larger than 256 MiB, one that can't be opened, a document that
shows nothing, or a run longer than 20 seconds writes no PNG and exits
non-zero, so the file manager keeps the file's icon. The Nightly deb and
rpm leave the entry out, as they leave out the MIME package.
The render moves into vectorcraft_render::encode::first_artboard, which
the embedded native preview also uses.
On Linux, the interface fonts find a CJK face through a fontconfig
lookup that runs on its own thread and starts the first time a CJK
character has no glyph. Until it ends, Japanese labels draw without
glyphs. The pass after it ends registers the face, and the next frame
lays the labels out again, which moves the controls around them.
hyphenation_keeps_focused_edits_until_cancel_or_ok and
localized_compact_gallery_pointer_applies_and_cancels measure their
controls in one frame and click them frames later. When the lookup ends
in between, the click misses: the Hyphenation checkbox keeps its old
value ("ja Cancel: Some(8.0), (Some(8.0), Some(false))"), or the
gallery's OK applies nothing. A loaded machine slows the lookup's
fc-match runs, so it ends inside the Japanese pass.
testing::wait_for_cjk_fonts starts the lookup and waits for it through
its completion callback, with no timeout. Both tests call it before
they measure anything, so each new context registers its face after its
first pass and the controls stay in place from then on.
A key such as `1` reads position 1 of a collection, not an object named
"1". The parity line now says that only numbers outside the array-index
range, such as `-1` or `1.5`, are looked up by name, as `docs/mcp.md`
already does.