- imageCapture refuses a path that any open document's link is read
from: the stored path from the document's folder, the relative path
from the file the document was read from (a template opened as an
untitled document included), the name in those folders, and a DCS
image's plate files beside each of those places. Documents the
interface opened while the run was paused count too.
- new IllustratorSaveOptions() starts with compatibility
Compatibility.ILLUSTRATOR19.
- PageItem.controlBounds throws that it is not available yet instead of
giving the visible bounds.
- move and duplicate with PLACEAFTER and a clipping group's clipping
path as the relative object throw an error.
- The settings of one run's DocumentPreset objects hold at most 4 MB
together.
- A run keeps the page-item lists of up to 8 documents, so reads that
alternate between documents do not walk them again.
object.rasterize with ids now does what the same objects selected do:
an object listed with a group or layer that holds it is left out and the
group is rasterized, as edit::roots_of leaves it out of a selection.
Document.rasterize still throws an error for such a list before it runs
the command.
The checker lists Document.imageCapture with saveAs and exportFile as a
document method that writes the file it is given, and the host name
check gives it an OUTSIDE row. RasterizeOptions and ImageCaptureOptions
move to the bare classes, as the save and export option classes did.
A capture whose clipBounds miss all the art writes a blank image of that
area, and a new test covers it; docs/mcp.md says so beside the rasterize
rule, which throws an error for such bounds.
Document.imageCapture compared only paths that exist, so a capture to
the path of a linked image whose file is missing created the file the
document then loads from that link. Each path is now compared as its
folder's real path and its name, so a missing file counts too. A name
that differs only in letter case is the same file in a folder whose
names ignore case: the folder's own entries are looked up with their
ASCII letter case swapped, and on macOS the nearest folder above on the
same volume. When neither tells, the capture is refused.
Document.rasterize(sourceArt, clipBounds?, options?) replaces one page
item or a list of them with an embedded image in one undo step and gives
the new RasterItem; the source objects go stale. Document.imageCapture(
imageFile, clipBounds?, options?) writes a PNG of all the visible art,
on the artboards or off them, or of the area clipBounds names. new
RasterizeOptions() and new ImageCaptureOptions() start with the
defaults the help pages give, and the enumerations AntiAliasingMethod
and RasterizationColorModel hold their values. Every option goes to the
command explicitly, so the document's raster effects settings do not
change the result.
object.rasterize takes ids, to rasterize those objects instead of the
selection while keeping the selection less the replaced art, and
clipBounds, which cuts the image to a rectangle that must reach the art
itself. Its result adds imageId, the image inside the clip group when
clippingMask makes one.
VectorCraft's own rules: clipBounds is [left, top, right, bottom] in
the script's coordinates and is never reordered; imageCapture writes a
PNG and needs a .png name; transparency wins over backgroundBlack and
over matte; padding takes 0 to 1,000 points and both resolutions 72 to
2400 ppi; an image over 64 megapixels or 32,768 pixels a side throws
before anything is drawn. imageCapture writes only where the script's
File objects may, and never over an open document's file or a file one
of them links, wherever the linking image or placed document is stored.
convertSpotColors, convertTextToOutlines and includeLayers set to true,
and Document.windowCapture, throw an error that says they are not
available yet.
A New Document profile file that is a link or a folder is no longer read:
the read is exempt from a script's file gate, which never checked where a
link leads. file.new reports it as a profileError with the reason "not a
plain file".
Reading a DocumentPreset setting now counts the value it returns toward
the data a run may pass, as assigning it does, and addDocument counts the
preset's settings before copying them.
The removeAll() test on a locked artboard now also holds an object on an
unlocked artboard and checks it is still there after the call throws.
A preset made with file.new's rows under gridByColumn shows the column
count those rows give the current number of artboards. Changing the
Layout field removed the rows and kept the preset's stored columns, so
Create laid out a different number of columns than the dialog showed.
The layout change now writes the shown count into columns, for rows
stored as integers or floats. Under gridByRow the dialog shows the
stored columns and file.new rejects rows, so a layout change from it
keeps the stored columns, as it does for rows file.new would reject.