When the planar map is skipped because the paths have too many pieces
(SHAPE_BUILDER_MAX_MAP_EDGES, added in 7a46d5ec56), too many segments
or exceed the sweep's work budget, Divide with open paths fell back to
the filled areas. It replaced the selection with the uncut shapes and
deleted the cutting paths without saying so. Live Paint built no faces:
Make reported the paths as too degenerate to paint, and with Gap
Detection a group could get its edges and no faces.
pathops now has try_pathfinder_with, try_live_paint and
try_live_paint_with_gaps, which return TooManyPieces in those cases
without sweeping the filled areas. Divide, Live Paint Make, Merge and
Gap Options use them and stop with an error that leaves the art
unchanged. The caps, and the fallbacks of pathfinder_with, live_paint,
live_paint_with_gaps and the Shape Builder, are unchanged.
When a Gap Options preview fails after one that found gaps, the dialog
no longer keeps drawing the earlier preview's gaps over the groups the
failure put back.
Docs: docs/mcp.md, the commands' params text and the Divide line in
docs/target-app-parity.md.
A raw bitmap with no width or no height is not taken in place of the
text beside it, so the text is pasted. Bytes past a raw bitmap's pixels
are dropped before the pixels are stored, so the PNG encoder is given
exactly the pixels the size names and the paste goes through.
(cherry picked from commit 6a4c1e6af9)
When a picture is read later in place of text that only names it, a raw
bitmap whose pixels don't fill the size in its header is not taken: the
text beside it is pasted, as for any picture that can't be read. A raw
bitmap with no text beside it is still read and its error reported.
read_pixels documents what happens when the renderers' store refuses
the decoded pixels: they are dropped, and the PNG is decoded as any
other image is. A render test covers that case.
(cherry picked from commit 438ffdcebe)
A paste of a picture copied in a browser or another app read the
clipboard's pixels, encoded them as PNG, then decoded that PNG again to
check it before keeping it. The paste now encodes the pixels once for the
document and keeps the pixels it already has as the decoded image the
canvas draws, so the read decodes nothing.
decode::decodes counts the images decode_image decodes on a thread, and
the new test checks that such a paste decodes none.
(cherry picked from commit ea828714fb)
The shared swatch pair exposes unnamed radio parts. Drive real clicks on the exposed area of Stroke and Fill and keep the original paint and modifier assertions.
Restore the glide when Zoom with Scroll Wheel and Animated Zoom are both on, as in 0.24.1. The canvas keeps precision point input and pinches immediate. Tracks #10418.
With one image selected, the Control bar and the Properties panel ask
image.info for its details again after every change to the document,
each step of a drag included. image.info decoded the whole image to
find its color mode, so dragging or redrawing a large placed image
(about 8000 x 4000 px) spent hundreds of milliseconds per step on the
UI thread. A group holding the image did not lag.
image.info and file.place.info now read the color mode from the
header of a PNG, JPEG, TIFF, PSD, GIF or BMP file, and report RGB for
WebP, without decoding the pixels. Other formats are still decoded.
(cherry picked from commit 194de01a52)
The canvas kept the selection's outlines, anchors and dots only while the
document revision stayed the same, so every move command, nudge and drag
step built them again from every selected object. With 10,000 selected
rectangles one build took about 26 ms in a release build.
A move of whole objects now records the documents before and after it
and the distance (DocState::moved). The record is made only when each
moved object is still the node the transform left (no later pass, such
as the pixel grid snap, changed it), none is a member of a blend, and
every object the selection shows, the key object and the key anchor's
object included, is a moved object or inside one. Copies, scales, moves
of patterns alone and moves that resize type areas make no record.
The canvas moves its kept marks by that distance when the record names
the document they show, or the document a drag began with. It also keeps
them through a new revision of the same document and selection, as at
the end of a drag. Every other change builds them as before.
(cherry picked from commit 389fc65631)
The Scale Cursor Proportional to UI preference was never passed to the
interface, so painted tool cursors always grew with UI Scaling and showed
twice as large at 200%. The preference now decides it, and it is off by
default.
(cherry picked from commit 0ef22709c1)
When the sweep cuts the paths into more than SHAPE_BUILDER_MAX_MAP_EDGES
pieces, the Shape Builder falls back to the regions of the filled areas,
which are capped separately. The docs said it then finds no regions.
(cherry picked from commit 1b59873456)
Paths that cross each other many times are cut by the sweep into far
more pieces than they have segments, and building the regions and edges
of those pieces took minutes and gigabytes of memory. 400 circles
stacked nearly on top of each other (1,600 segments) were cut into
about 320,000 pieces, and their map took 60 s and 4.2 GB, enough to
make the whole computer unresponsive.
The Shape Builder now stops after the sweep when it cuts the paths into
more than SHAPE_BUILDER_MAX_MAP_EDGES pieces (twice
SHAPE_BUILDER_MAX_SEGMENTS, what open paths that cross nothing make at
that cap) and finds no regions. The filled-area regions it falls back
to are capped the same way.
(cherry picked from commit 7a46d5ec56)
A corner in one subpath gave the stroke's join to the lines of a curve
in another subpath that met at the same point, so a miter could be
drawn there instead of a round join. The corners are now kept per
subpath and each subpath of the outline reads only its own.
Test: a curve's outline is the same with and without a second subpath
that has a corner at the curve's start.
(cherry picked from commit f1ef1a4e39)
Since #9972 a thin stroke along a curve is drawn as lines, and where two
of those lines met at a sharp angle the stroke's own join was drawn
there. Along smooth anchors that sit close together after a bend, or a
curve that bends tightly, the lines turn sharply, so a miter join drew a
spike past the stroke and the smooth curve showed sharp corners on the
canvas. The document's anchors are unchanged; only the drawing was
wrong.
The stroke's join is now drawn only at the path's own corners, where
two segments meet with tangents that are not in line. Where the lines a
curve is drawn with turn sharply they meet with a round join, as the
stroke along the curve itself is round there.
Tests: a bend followed by smooth anchors 0.1 and 1 apart keeps every
outline point within the stroke's width of the curve and covers it;
with long handles the outline matches the curve's own outline away
from its edge; 200 random cubics with a miter join keep their outline
within the stroke's width of the curve.
(cherry picked from commit 69ff74a63b)
With the Selection tool, a selected path drew the direction handles of
every anchor, so it looked as if Direct Selection were active. The canvas
marks now draw the handles only where a tool drags them: a partial
selection's anchors, a selected segment, and a path selected itself under
a tool that edits anchors. Every other selected path, including the
members of a group or compound path selected whole, shows its anchors
selected with no handles. A lone anchor selected whole is drawn with its
handles retracted.
(cherry picked from commit 1e4e7cfbfe)
An envelope of type whose type a text variable binds kept its drawn
art, its type hidden. The variable library names the hidden text object
a slot became, and a live envelope's type takes its place with an id of
its own, so the binding would have been dropped. Now such an envelope
opens live like the others, and a binding to the hidden text object
goes to the type in the envelope's contents. Where the drawn art is put
back (the page holds the envelope against the layers), the binding
stays on the hidden text object put back with it. A data set already
rewrites type in an envelope's contents, and the live envelope draws
from its contents, so the envelope bends the new text.
The editing copy of a .ai save left out bindings of type in an
envelope's contents with a warning; it now writes them for text
variables, so the type reads back bound. A visibility variable on the
type still keeps the drawn art: in a live envelope it would show and
hide only the type, not the envelope.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 4026cdb928)
The variable library can name a text object by its story's XML id
(AI11_StoryUID in the text object's /StoryDictionary) rather than the
object's own AI10_ArtUID. The reader only remembered AI10_ArtUID, so
such a binding found no object: the type came in unbound and the import
noted the bindings as skipped. The story's id now names the slot of the
story's first frame, the same way the object's id names the object;
for a story also written on %_ lines, the plain copy's slot, which is
the one the reader keeps.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 923f6bd7ee)
Document Info was left out of the panel forms that scroll inside their dock group, so in a short group its lower rows could not be reached. It now scrolls like the other forms.
A test draws every panel in 120 pt and 60 pt groups and scrolls each one until its lowest control is in view.
(cherry picked from commit d7686cd9f4)