RenderOptions::hidden was a Vec<NodeId>, and the renderer checked each
node it visits against it with contains (node_checks::left_out and
Renderer::draw_node), so every check could compare against all k
hidden ids. The Fold Preview print hides every non-printing layer and,
with Show Fold Lines off, every object with a line role.
hidden is now a HashSet<NodeId>, so each check is one hash lookup. The
Fold Preview collects print_hidden's list into the set, and two tests
that built the field with vec! build it from an array. The field's doc
comment now names the Fold Preview print as its example.
New test a_render_leaves_out_every_object_of_a_large_hidden_set renders
2,000 strips with 1,000 of them in hidden and checks every strip's
pixel. It checks that hiding still works for a large set; the old Vec
drew the same pixels, so the test does not fail at run time without
the change.
- A file's corners are kept only when there are exactly four that the
image can take; a longer list is skipped without decoding it. Corners
the affine map misses stay a distortion, and a scale past the
perspective limit leaves the image at its nearest affine placement.
- Distort checks the corners in a frame local to the quad, so a missed
corner far from the origin is still refused.
- Relink and Unembed refuse a named or selected distorted image before
searching a folder or writing a file. Create Gradient Mesh lists the
distorted images it leaves in `skipped`. Place with Replace refuses
only when the measured image is distorted and the file is not text.
- SVG cuts a distorted image in a scaled symbol instance at the placed
size. EMF pieces store only the pixels inside their clip. PDF mesh
pieces of a CMYK image keep a same-corner mask as its soft mask, color
mask included. Both `.ai` writers write an image at the nesting limit
at its nearest placement with a warning. DXF warns only when it writes
the image.
- The canvas cuts the mesh by the view's largest stretch. Warped images
with a singular placement keep finite corners.
- docs/mcp.md and docs/plugins.md describe the tolerances, the DXF and
WMF fallback, the partial result of Create Gradient Mesh, and when a
plug-in sees `corners`.
A pattern's tile drawn for a proof that preserves the colors' numbers
kept the proof's image tables for its opacity masks, so a mask's image
was proofed and the mask covered differently than outside a pattern.
The mask now leaves its images as they are when the tile's ink carries
that proof, as it does for the frame's proof.
Measure effect-bearing Align to Path content after spine placement, retaining
the conservative envelope and covering damage containment with original
software-rendered move and Undo controls.
With transparent pixels and Colors at 256, a custom palette of one opaque color and 255 colors mapped to transparent has no room for the last of those, and its pixels took the nearest entry left, which could be the opaque color. Such pixels now take the transparent entry when their nearest color is one that did not fit.
Lossy compression compared each pixel with the reduction's colors, so a pixel next to a color shifted by hand could join that color and be written in its new color, and a pixel of the shifted color could leave it. Lossy now leaves the entries of shifted colors alone, as it does the transparent entry.
The color table's trash button and Delete Color in its new menu delete
the selected GIF or PNG-8 colors. Pixels that used a deleted color take
the nearest color left, with the current reduction's color distance and
dither, and the preview matches the saved file. A click selects one
color and makes it the anchor, Shift-click selects the range from the
anchor, and Ctrl-click (Command-click on macOS) adds or removes one.
- colorTable.deleted lists the deleted colors by source. A deleted color
leaves the locked, transparent and webShift lists.
- colorTable.customPalette fixes the palette at the first deletion, so a
deleted color is not made again; the table reads Custom. Restore
Generated Table in the menu, or another reduction, clears both.
- Deleting every opaque color, or every color not mapped to transparent,
is an error and changes nothing.
- Presets and the remembered settings keep the edit.
- quantize_to uses all 256 fixed colors when no pixel is transparent.
Docs: docs/mcp.md, docs/target-app-parity.md.
A damaged .ai can give a gradient mesh whose outline is enormous but finite.
draw_mesh_raster flattened that whole outline in device pixels (grown_outline),
and kurbo's flatten then asked for more segments than memory holds: a
"capacity overflow" panic (seen in import_fuzz's ai_written_meshes_never_panic).
An outline wider or taller than 2^24 device pixels now goes to the per-quad
drawing path the function already falls back to.
Perspective Distort and Free Distort (`object.distort`) used to give an image
only the warp's affine approximation at its center, so its corners did not
follow the handles and it drifted away from paths warped with it.
- An image's four corners now go exactly where the warp takes them, alone or
in a mixed selection. A parallelogram stays in the image's transform; any
other shape is kept in the new `image_quad` field of the native file, which
older files do not have and still open as before.
- Corners that would fold the image over, fall on one line, cross the warp's
horizon or lie too close together for a perspective map are an error, and
nothing changes. A file whose corners break these rules opens with the image
placed by its transform. A drag is one undo step, and a distort that leaves
the corners where they are records none.
- Bounds, hit testing, transforms, Transform effects, blends, the Eyedropper,
Outline view, the Color Theme Picker and Weed Box and Lines follow the
corners. Image info measures the resolution at the image's middle, and
plug-ins get the corners.
- The canvas, printing and every exporter draw a distorted image as a mesh of
affine image pieces through the shared mesh warp, clipped by the corners.
In files and print the mesh aims to stay within 0.05 pt with cells of at
least 2 pt; the canvas cuts it for the zoom, within a quarter of a pixel
with cells of at least 4 pixels. Pieces reach into their neighbors (0.5 pt,
or 2 pixels on the canvas), so the image stays opaque at every zoom. The
mesh has at most 64 by 64 cells and no more cells across than the image
has pixels on its longer side (at least 8). No warped copy of the pixels is
stored. DXF and WMF write the nearest parallelogram and warn.
- Crop Image, Image Trace, Relink, Embed, Unembed, Create Object Mosaic,
Create Gradient Mesh and Place with Replace refuse a distorted image with an
error that names the distortion. Update Links puts a changed file's pixels
between the same corners, without applying Placement Options. Mask follows
the corners. Rasterize makes a plain image of it.
- The new error messages have rows in every complete-message catalog.
Docs: docs/mcp.md, docs/plugins.md, docs/target-app-parity.md.
A VP8 key frame stores its first partition's size in 19 bits (RFC 6386
section 9.1). The encoder writes 524,287 for a larger partition too, and
a decoder then reads the token partition from the wrong offset. A lossy
WebP whose size field is at that limit now fails with an error that
suggests a lower resolution or Lossless, instead of writing a file that
does not decode.
On a path or compound path, a Transform effect with copies listed after
the object's own Rasterize effect now places the one image Rasterize
makes of the art before it on the original and on each copy: copy k
through the effect's map applied k times, with its pixel grid and its
room around the art, the last copy lowest and the original on top.
Before, the Transform effect copied the art and Rasterize made one image
of all the copies on a grid square to the page.
The image is made once for every placement, also when a shadow or glow
is listed between the Rasterize and Transform effects. The canvas, the
object's bounds, Expand Appearance and PDF export use the same
placements; Expand Appearance and PDF export make a group of images that
share the one image's pixels. Copies stop where the copied art stops,
and a copy scaled to nothing is left out.
WebP Options has a Compression menu (Lossless, Lossy) and a Quality
slider from 0 to 100 that is enabled for Lossy. document.export,
document.serialize and Export for Screens take lossless: false with
quality (default 90) and write a VP8 file, with an ALPH chunk that keeps
the alpha exactly when some pixels are not opaque. Lossless stays the
default. A WebP quality above 100, or one that is not a whole number,
is refused with an error.
The encoder is the one craft-image-codecs already provides; no
dependency changes. The note that lossy WebP isn't available, its
catalog rows and the format text that described it are removed.