The search for brushed strokes that decides between knockout masks and
a PDF knockout group copied a dynamic symbol's art for every instance
with appearance changes, and looked through the evaluated art of live
objects, without a limit. Nested instances could make it copy and walk
art exponentially before any limit applied.
The search now visits and copies at most MAX_KNOCKOUT_MASK_OBJECTS
objects for a group, counting a dynamic symbol's art before copying it
and a live object's evaluated art before looking through it. When the
limit runs out, the group is written as a PDF knockout group with the
size warning. Each symbol's art with one set of appearance changes is
copied once, and art that holds itself ends the search.
The copies of symbol instances drawn in a knockout group's soft masks
counted toward the objects the export's visible symbol art may hold, so
overlapping instances could use that limit up and leave later visible
instances out. Mask copies now count toward a limit of their own. When a
group's masks would leave out symbol art because that limit runs out,
the masks are discarded and the group is written as a PDF knockout
group, with a warning.
The object count that decides whether a group is drawn through masks
left out the art a brushed stroke expands into. A group in which a mask
would draw a brushed stroke is now written as a PDF knockout group, with
its own warning. The search follows what the export draws: visible
members, opacity masks that are on, symbol and inline graphic art, live
objects and placed documents as evaluated, and pattern tiles, and it
skips strokes without paint, width or a known brush.
A knockout group whose elements need no masks is written as a PDF
knockout group without a warning, so the two engine PDF tests that
expected the old warning now check that case and the brushed one.
A knockout group was written as a chain of soft masks, one inside the
next for each element, so a group of about 200 elements made a PDF that
VectorCraft's own PDF import refused (form nesting past 50) and an SVG
that the web build refused as too deep.
- PDF writes a knockout group as one transparency group with /K true,
with /I true when the group isolates, and PDF import reads it back as
a knockout group. An element with several paints is drawn as one
group inside it, so its own fills and strokes do not knock each other
out.
- Where an element knocks out less than the area it paints (its opacity
or mask defines its knockout shape, or it paints translucently), each
element is drawn through one soft mask of the overlapping elements
above it. Past 65,536 objects in a group's masks, or 2,048 elements,
the group is a PDF knockout group, with a warning.
- SVG draws each element through one mask of the overlapping elements
above it, built from one shared copy of each element's shape, so the
elements stay siblings. Past 65,536 shapes in a group's masks, or
2,048 elements, the group is written as a plain group, with a warning.
Docs: docs/mcp.md, docs/target-app-parity.md.
With repeated names numbered when a brush library is read, a stroke that
names a repeated brush draws the first brush of that name, and a later
brush of the name is read as "Name 2". Three tests built a library with a
repeated name and expected the later brush:
- Document Info lists a name two stored brushes share with the first
brush's type (art), not the last one's.
- The two render memory tests add their own `Dots` scatter brush beside
the default library's `Dots`. They now remove the default `Dots` first,
so the stroke draws their brush.
- The .ai writer test that leaves out a Pattern brush "X" gets the
Calligraphic brush after it back as "X 2", the name it had in the
document.
With the selection as its scope, a fix that removes or unwraps objects
(Needless Groups, Stray Points, Empty Text and the others) kept the list
of selected objects current by searching it and splicing it once for each
object it changed. Removing many selected objects above a long run of
others took time that grew with the square of their number.
The list is now rebuilt in one walk after each pass: each changed object
gives way to what replaces it, in its place, and the others keep their
order. The objects found, the counts, the document and the undo step are
the same as before.
Empty Artboards deleted each empty artboard with its own Vec::remove and
walked every ruler guide again for each one. It now drops the empty
artboards in one walk and deletes their guides in one more. The same
artboards and guides are deleted as before.
Tests cover the order after unwrapping nested and empty groups, Fix All
reaching an unwrapped member on a later round, the rebuild itself, the
number of objects looked at for 150 and 300 removals, and the number of
walks over the artboards and guides when 40 empty artboards are deleted.