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.
Each object of a host class keeps its handle twice, once in its slot and
once in the realm's index of the objects scripts hold, but creating one
reserved only the object's own bytes, and the collector's live-byte total
left the handle out. A host value with a long handle could therefore grow
the heap past the script's limit.
The object now reserves its handle's bytes before it is made, and the
collector counts them for every live object. Tests cover a handle larger
than the remaining budget and the bytes 100 retained objects add.
A copy whose saturation jitter would move a color past full saturation
(or past the largest Lab a and b) left the color as it was but still
dropped its swatch link, so a spot or global color lost its link in
those copies. Such a copy now keeps the color and its link, as brightness
jitter does for a color already at black or at full brightness.
addon.pathtools.shape.create and addon.pathtools.shape.set take sliceStart
and sliceEnd, in degrees clockwise from the shape's top (0 to 360). The
shape is cut from the start clockwise to the end and back through its
center; a ring's slice runs back along its hole. The angles are measured
as if the shape were as high as it is wide, so 45 degrees is a
rectangle's top right corner and a slice keeps its place when the shape
is stretched along its own axes. The same start and end leave the whole
shape, rounded corners are rounded before the cut, and the arrow, cross,
heart, gear and speech bubble ignore both values. A value outside 0 to
360 is refused. The values are kept with the shape's other numbers and
with the Parametric Shape Tool's options.
A scatter brush takes a Brightness Jitter amount from 0 to 100 percent (0
by default). Each copy moves the brightness 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 and saturation jitter. The
amounts come from the stroke's path and the brush name, drawn apart from
the hue and saturation 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 their amounts.
A color keeps its hue and saturation and moves in its own model: RGB in
the HSB of its values, Gray by its ink, Lab by its lightness with a and b
kept, and CMYK by its K over the brightness its C, M and Y leave. A CMYK
color that goes brighter than its C, M and Y show with no K loses its K
and takes less C, M and Y. The brightness stops at black and at full.
White, black and grays move too. A brush at 0 saves no brightness_jitter
key; a brush without the key reads as 0.
- brush.options takes brightness_jitter, and brush.get shows it for every
scatter brush. Brush Options shows a Brightness Jitter field
(ui.brushOptions field brightnessJitter).
- Options of Selected Object sets a path's own brightness_jitter
(brush.objectOptions).
- The brightness goes through the per-copy recolor step hue and
saturation jitter use, with its own salt.
- 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.
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 private data streams of a .ai file, or of a PDF saved with its
editing data, were joined into one buffer of at most 256 MiB before
they were decoded, while the decoded editing data may take up to an
eighth of installed memory (512 MiB to 2 GiB). A file whose streams
passed 256 MiB opened as its PDF part without a note, and a file whose
PDF part can't be read failed with "it is larger than 256 MB".
The streams are now read one after the other and decoded as they are
read, so they are never joined. The decoded data keeps its limit, and
no more of the streams is read than that limit and a sixteenth more.
The data is decompressed after the first compression marker in it.
A click on a path's direction handle picks it, a Shift-click adds it to
the picked handles or takes it away, and Escape lets them go. Picked
handles show ringed. Dragging one of two or more picked handles moves
all of them, on one path or several, by the same offset in one undo
step. A Shift-press on a handle reshapes only once the pointer has moved
3 pixels, so a Shift-click leaves the handle where it is.
The new command path.moveHandles does the move: an anchor with one
handle listed places it as path.setHandle does, an anchor with both
listed moves both and becomes a corner, and independent (Alt during the
drag) makes every listed handle's anchor a corner.
Docs: docs/mcp.md, docs/target-app-parity.md.
When object.setLiveShape carries a pixel-aligned shape with patterns on, the
final snap to the pixel grid now moves its patterns as well, so the pattern
keeps its place on the shape. With patterns off the pattern stays where it was.
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 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.