Commit Graph
1209 Commits
Author SHA1 Message Date
BFlat facb326b16 Merge pull request #8377 from dotCooCoo/perf/inline-refresh-changed-subtrees
Type: inline graphics are checked again only in the layer trees an edit changed
2026-11-18 12:57:22 +07:00
BFlat c0ec570d0f Merge pull request #8371 from dotCooCoo/feat/transform-line-properties
Transform: a live line shows Line Properties with Line Length and Line Angle
2026-11-18 12:57:04 +07:00
BFlat d5d66cf8de Merge pull request #8370 from dotCooCoo/perf/swatch-link-roots-set
Swatches: linking the selection's paints checks ancestors through a set
2026-11-18 12:55:21 +07:00
BFlat 61d3190469 Merge pull request #8181 from dotCooCoo/feat/area-type-first-baseline-em-box
Type: Area Type Options First Baseline offers Em Box Height
2026-11-18 10:22:23 +07:00
BFlat 3a9bb87022 Merge pull request #7925 from dotCooCoo/feat/brush-options-of-selected-object
Brushes: Options of Selected Object changes one brushed path's brush settings without changing the brush
2026-11-18 10:18:41 +07:00
BFlat 1380e9c480 Merge pull request #7675 from dotCooCoo/feat/unit-converter
Unit Converter: one length in every unit, read from and applied to the selection
2026-11-18 10:16:26 +07:00
BFlat f66c2e78ad Merge pull request #8182 from dotCooCoo/feat/list-start-number
Lists: a numbered paragraph can start at a chosen number or restart at 1
2026-11-18 10:16:16 +07:00
dotCooCoo 9591bdf68d Merge main into perf/inline-refresh-changed-subtrees 2026-11-17 13:30:42 -08:00
dotCooCoo 1ea1fd8556 Merge main into feat/transform-line-properties 2026-11-17 13:26:08 -08:00
BFlat 1f84febb08 Merge pull request #8169 from dotCooCoo/fix/symbol-lookup-index
Symbols: render and SVG/PDF export find each instance's symbol in one index
2026-11-18 03:23:44 +07:00
BFlat 409b8ce9d1 Merge pull request #8058 from dotCooCoo/perf/selection-batch-toggle
Selection: select.toggle and select.add with many ids go through the selection once
2026-11-18 03:19:52 +07:00
dotCooCoo 24e0208d31 Type: inline graphics are checked again only in the layer trees an edit changed
After an edit of a document with symbols, the refresh of inline graphics
walked every node of every layer. It now keeps the document the last
refresh left resolved, with the symbol bounds it measured, and checks
only the layer trees that are not the same nodes as that document's,
as long as the symbols, graph designs, pattern tiles and foreign data
(which holds the symbols' natural sizes and 9-slice guides) are the
same and each measured symbol still measures the same. Otherwise the
full pass runs, as before. Visit order is unchanged, so the document
and the ids of the texts laid out again equal the full pass's.
2026-11-17 10:08:24 -08:00
dotCooCoo cd4e9e9506 Transform: a live line shows Line Properties with Line Length and Line Angle
A line drawn with the Line Segment tool now shows Line Properties in the
Transform panel and the Properties panel's Transform section, with the two
properties the help page lists for a line:
https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/modify-live-shapes/live-shape-properties.html

- object.setLiveShape takes lineLength (pt, above 0) and lineAngle
  (degrees, brought into 0 to 360). Every selected line changes in one
  undo step; a value that changes nothing records none.
- VectorCraft's own rules: the angle runs counterclockwise from 3 o'clock,
  as the Rotate field does; a new length keeps the first end in place and
  a new angle turns the line about its midpoint; a line whose ends meet
  reads 0 degrees; the section shows only while every selected object is a
  live line; a line that would reach past the coordinate limit is an error
  that changes no line.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-17 09:57:07 -08:00
dotCooCoo c226533bc9 Swatches: linking the selection's paints checks ancestors through a set
Add Used Colors and New Color Group link the selected art's paints to
global swatches through Document::map_solid_paints_in, which drops each
id that sits inside another listed id. It searched the whole id list for
each ancestor of each id, so the work grew with the square of the
selection. It now looks each ancestor up in a set of the ids, as
without_inner in crates/engine/src/cmd/edit.rs does. The roots keep the
order of the list, duplicates and ids missing from the document, so the
same paints are linked in the same order.

- mapping_within_ids_matches_a_search_of_the_ids compares the count, the
  paints visited and the resulting document with the search for every
  list of up to three ids from a nested tree (nested ids in both orders,
  duplicates, a missing id and an empty list).
- crates/engine/examples/link_colors_bench.rs times both ways in one
  process. With 20,000 selected rectangles the call takes 16 ms of CPU
  time instead of 128 ms; with 2,000 it takes 1.4 ms instead of 2.5 ms.
2026-11-17 09:49:45 -08:00
Don Omondi 4881a46f34 Merge remote-tracking branch 'upstream/main' into fix/twist-smooth-7069
# Conflicts:
#	docs/effects-parity.md
#	docs/target-app-parity.md
2026-11-17 08:33:56 -05:00
Hamza 957cd66a82 Scale Text Attributes: path type bakes only the uniform part of a scale
Type on a path sits at fractions of its path's length. Scaling the path
non-uniformly changes where a fraction lands (CodeRabbit's case: M0 0 L100 0
L100 100 under diag(2, 1) moves the start bracket from (200, 0) to (150, 0)).

Path type now bakes the vertical scale into the character sizes and scales
its path uniformly by it, which keeps every fraction where it was; the
horizontal stretch stays in the transform.
2026-11-17 14:17:49 +05:00
Hamza 586db4da06 Scale Text Attributes: an area's frame and a path type's path keep their size
Baking an object's scale into the character attributes removed that scale
from the type's transform, but the area frame (and a path type's path), which
is drawn through that transform too, kept its unscaled size. A 120 x 80 frame
scaled 200% shrank back to 120 x 80 on the page, so the 24 pt type broke into
two lines and the rest became overset.

The frame and the path now take the scale the transform loses, so they, the
line breaks and every glyph stay where they were.

Fixes #8297
2026-11-17 13:41:14 +05:00
BFlat 6a2fa16cd1 Merge pull request #8289 from dotCooCoo/feat/ai-blends-in-editing-copy
.ai save: the editing copy keeps live blends
2026-11-17 14:32:25 +07:00
dotCooCoo 3829880993 .ai save: a live blend's steps carry no text wrap; metric distances stay live
- The steps of a live blend are written as drawn art: copies of key
  objects with text wrap options no longer write those options again.
  The keys keep theirs on the hidden lines and the blend keeps its own.
- The record holds Specified Distance as a 32-bit float, which the
  reader reads back as its shortest decimal. The writer now compares the
  blend with that distance, so a distance typed in another unit (10 mm
  is 28.346456... pt) is written live when it lays out as many steps.
- blend_steps_settled has unit tests for each of its cases.
- blends_write_the_same_bytes_again checks that every blend is written
  live both times.
- Comments name the blend plugin's XP line by its constant.
- docs/target-app-parity.md lists live blends in the .ai editing copy;
  a line in docs/file-format-parity.md is wrapped like the rest.

Tests: a_live_blends_steps_carry_no_text_wrap_options,
a_blend_spaced_in_millimeters_is_written_live,
steps_settle_unless_rounding_can_change_their_count.
2026-11-16 21:19:00 -08:00
BFlat 685e77af6b Merge pull request #8236 from dotCooCoo/feat/print-custom-scale-link
Print: a link button keeps Custom Scale W and H equal
2026-11-17 09:49:36 +07:00
dotCooCoo 4b2868bd07 .ai save: the editing copy keeps live blends
The editing copy of a PDF-compatible .ai wrote every blend as its steps.
Blends the .ai reader opens live are now written live:

- The blend's key objects and, when it has a spine of its own, its
  spine are written as a group on hidden lines, each key's dictionary
  naming it a key and its id and the spine's naming it the spine. Its
  steps follow as a group, then the Path Blends record of its spacing
  (Smooth Color, Specified Steps, Specified Distance with its distance),
  orientation (Align to Page, Align to Path) and keys, then its
  dictionary (name, text wrap options, variables) and its opacity and
  blending mode as a group's after its end. A spine edited on the canvas
  is written with each key's anchor on the key. A replaced spine is
  written with an anchor where each key sits, so it opens with those
  anchors and lays out the same steps.
- Each blend is checked with the reader's own reading before it is
  written, and the blends together against the objects the reader lays
  out in one file. Written as their steps with a warning: blends with
  easing, a color shift or start points; with effects, an appearance or
  an opacity mask of their own; of objects other than paths, compound
  paths and groups, of clipping groups, of more than 62 key objects, of
  hidden keys or keys holding a blend; of keys with geometry or
  Pathfinder effects or a group's own fills and strokes, which the
  editing copy writes as their result; of keys the editing copy would
  change otherwise (empty paths or subpaths, paths and compound path
  members of several subpaths, several fills or strokes, strokes a plain
  line can't draw, dashes of more than 64 lengths, hidden fills or strokes, fills or strokes other than
  a color, in a Lab color or with transparency or effects of their own,
  effects, opacity masks); blends where one key has a fill or stroke of
  no paint or a stroke of no width and another has one that draws;
  blends whose spine has more than one part;
  blends whose step count is close to where rounding the written
  coordinates and colors changes it; blends the reader would open with
  other settings or not as drawn; blends inside objects with geometry or
  Pathfinder effects or a group's own fills and strokes; blends in
  opacity masks, pattern tiles, symbols and art cut to a clipping object
  or nested eight levels deep in art written in place of other objects;
  blends whose art would pass the most objects the reader reads; and
  every blend on a large canvas.
- The steps set their own transparency and lock and hidden state after
  the hidden lines, for readers of the printed form.

Each construct is written in the form the .ai reader reads (blend.rs,
read/document.rs blend roles, read/containers.rs end_blend, read/ops.rs
XP and transparency), and every object written counts toward the
reader's object limit as the reader counts it. The record's orientation
word and a blend with no spine part are read as #8243 reads them.

Blend Options, key objects and spines:
https://helpx.adobe.com/illustrator/desktop/manage-colors/apply-transparency-and-blending/blend-options-overview.html
https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=260

Tests: the round trip of blends of each spacing and orientation, with
no spine of their own, an edited spine and replaced curved spines,
named, at half opacity, hidden and locked, with text wrap options, of
compound paths, of groups and of 62 keys, each laying out the same steps
as the document's blend; the record's words (Align to Path's angle
included) and the dictionaries; the steps' own state after the hidden
lines; the same bytes on a second write; each case written as its
steps, with as many steps as are drawn, where they are drawn (among
them Specified Distance 0.03 pt from where its count changes, on a
spine of 200 segments, which comes back live on a spine of two); blends in
pattern tiles, opacity masks, symbols, art cut to a clipping object and
eight levels down; the object limit; the reader's blend limit; a large
canvas; fuzz cases for damaged written blends.

Docs: docs/file-format-parity.md.
2026-11-16 17:31:04 -08:00
dotCooCoo 3dd40902a5 Print: note EPS export of process-named spot stops with plates
EPS export writes a gradient whose stop links to a spot swatch named
Cyan, Magenta, Yellow or Black and carries process plates in process
colors, with a warning. The stop_inks doc comment and the progress-doc
line now say so.
2026-11-16 15:59:22 -08:00
dotCooCoo 31c53a8658 Print: spot plates follow the swatch art links to by name
A fill, stroke or gradient stop links to a swatch by name, and the first
swatch of that name is the one it prints from. The plate list added a spot
plate for every spot swatch, so a spot swatch after a process swatch of the
same name got a plate that printed nothing, while art linked by that name
separated as process. The plate list now takes only the first swatch of
each name.

A spot swatch named Cyan, Magenta, Yellow or Black had no plate of its own
and printed nothing on the process plate of its name. Art linked to it now
prints its tint on that process plate, as PDF and EPS export write it, and
a gradient stop's own process plates print beside it.
2026-11-16 15:29:19 -08:00
dotCooCoo 7036cfb67c Merge main into feat/print-custom-scale-link 2026-11-16 12:16:47 -08:00
BFlat 014caef43b Merge pull request #8176 from dotCooCoo/perf/task-bar-has-colors-early-exit
Task bar: the Recolor check stops at the first color
2026-11-17 02:51:01 +07:00
BFlat fb6845b07a Merge pull request #8161 from dotCooCoo/perf/cut-selection-one-pass
Cut: take the cut objects out of the selection in one pass
2026-11-17 02:50:44 +07:00
BFlat b9d74dab5e Merge pull request #8177 from dotCooCoo/fix/symbol-hit-test-box-cache
Symbols: hit tests keep measured symbol art boxes until the symbols change
2026-11-17 02:50:18 +07:00
dotCooCoo 4133419a31 Merge main into feat/print-overprint-black 2026-11-16 11:23:14 -08:00
dotCooCoo 3dedd7ca56 Merge main into fix/symbol-lookup-index 2026-11-16 10:57:10 -08:00
dotCooCoo b151643a73 Merge main into perf/selection-batch-toggle 2026-11-16 10:42:42 -08:00
dotCooCoo 27295b0530 Merge main into feat/area-type-first-baseline-em-box 2026-11-16 09:55:33 -08:00
dotCooCoo 49240f08e1 Print: Overprint Black follows instance paints and drawn gradient colors
- A gradient's freeform points count only when its kind is Freeform, in
  the Overprint Black check and in the plate separator. A gradient of
  another kind is checked by its stops.
- Characters inside opacity mask art no longer draw with Darken on
  separations, as the mask art's fills and strokes already do not.
- With Overprint Black on, a symbol instance whose own fill or stroke
  changes or fill stain repaint its art, or whose symbol holds such an
  instance, prints as its placed art and is checked with the paints it
  prints with. Placement stays within the symbol object limit and the
  drawn depth limit, and skips hidden objects and template layers.
2026-11-16 09:54:37 -08:00
dotCooCoo 1143546a0a Symbols: keep per-object measuring in the export walks; live walks and SVG import use the index
The export walks for type and fonts and the artboard crop shared one
SymbolBoxes for every object. A SymbolBoxes also holds measuring budgets
(effect reaches, 9-slice placements), so in a large document objects late
in a walk could be measured by estimates where main measured them exactly.
SymbolBoxes::unmeasured makes new boxes that share the name index, and each
object is measured in boxes of its own again.

- The live-object walk (render/src/live.rs) finds symbols through the
  frame's SymbolBoxes.
- SVG export's filter regions measure each object in unmeasured boxes, and
  the region boxes share the writer's index.
- SVG import keeps each imported symbol's index, so a symbol whose art
  holds instances no longer scans or indexes the list again.
- Object › Rasterize's clipping mask is left as it is on main, with
  drawn_outline_with removed.
- The symbol-read-count feature of vectorcraft-doc gives other crates'
  tests vectorcraft_doc::symbols_read. New tests check that a frame, an SVG
  export, a PDF export, the type walk and the artboard crop read the symbol
  list once among 2,000 symbols and 300 instances with drop shadows.
2026-11-16 09:07:50 -08:00
BFlat bf73a1450b Merge pull request #8110 from dotCooCoo/feat/place-linked-eps
Place: Link keeps a placed EPS linked to its file, as a placed PDF page already is
2026-11-16 23:53:44 +07:00
dotCooCoo 5c789eb818 Merge main into feat/area-type-first-baseline-em-box 2026-11-16 08:15:17 -08:00
dotCooCoo 207939e752 Merge main into perf/task-bar-has-colors-early-exit 2026-11-16 08:15:08 -08:00
dotCooCoo dc6f1d2c69 Task bar: the Recolor check stops at the first color
The Contextual Task Bar and the Control bar check, each time they are
drawn, whether the selection holds a color that Recolor Artwork can
change. The check walked the whole subtree of each selected object even
after the first color, so with one large group selected, the check read
every paint in the group.

- Node::try_walk visits in walk's order and ends at a ControlFlow::Break.
- swatches::node_has_colors stops at the first color node_colors would
  visit; node_colors now runs the same visitor without stopping, so the
  two read the same nodes and paints in the same order.
- has_colors in the task bar uses node_has_colors.

The result is the same for every selection. On one group of 100,000
paths, the check takes 16 ns instead of 14.5 ms when the first path is
filled; when only the last path is filled, or none is, it costs about
what the full walk costs.
2026-11-16 08:14:55 -08:00
BFlat b86585d1b4 Merge pull request #8109 from dotCooCoo/feat/ai-graph-filled-lines
.ai graphs: Draw Filled Lines and its Line Width open live and save through the Gy record
2026-11-16 23:07:27 +07:00
dotCooCoo 08c1684cd5 Symbols: hit tests keep measured symbol art boxes until the symbols change
Every click, hover, Select Behind list and marquee made new symbol boxes
and measured the art of each symbol its instances show again, and so did
the locked-artboard check each of them made. With 20,000 instances of
8,000 different symbols a click took 27 to 33 ms.

Hit tests now start from the art boxes, nesting depths and name index
that earlier hit tests measured on the same thread, for the last two
sets of symbols. The locked-artboard check of a hit test starts from the
same art boxes, and what it measures is kept with the rest. The boxes
are measured again when a symbol's name or art, the 9-slice guides or
the inputs of clipping-path effects change. The kept list holds a weak
pointer to each symbol's art, so it does not keep a closed document's
art alive, and art changed in place no longer matches. Art boxes of
symbols whose art holds 9-slice instances are measured on each call, as
before.
2026-11-16 08:00:28 -08:00
dotCooCoo f4c395f143 Lists: a numbered paragraph can start at a chosen number or restart at 1
Bullets and Numbering's Numbers tab gets a Start at box and number, and
text.setFormat takes startNumber (1 to 999999999) and restartNumbering.
The number goes to the first numbered paragraph the call touches that
holds text, and the numbered paragraphs after it at its level count on
from it, through threaded frames too. restartNumbering false removes the
numbers. A bad value, or both keys at once, is an error, and a call that
changes nothing records no undo step.

The native file saves the number as the list's "start" only when it is
set. A paragraph made with Return does not take it, a paragraph style
does not keep it, and Convert to Text and the exports write the numbers
the paragraphs show.

Part of #2473
2026-11-16 07:50:46 -08:00
dotCooCoo ecc6cd4c7c Merge main into feat/area-type-first-baseline-em-box 2026-11-16 07:48:10 -08:00
dotCooCoo 24e528abcf Type: Area Type Options First Baseline offers Em Box Height
First Baseline gains Em Box Height (`text.areaOptions {firstBaseline:
"emBoxHeight"}`, and the Area Type Options dropdown). The top of the
first line's ideographic em box, the largest on a line of several sizes,
touches the top of the type area inside the inset, in each row/column
cell and in vertical type. It is the em box that Top-to-Top leading
uses. Min is the least distance, as with the other kinds.

Native files save it as `emBoxHeight`. The .ai reader reads editing-data
kind 5 as Em Box Height and the writer writes it back; Legacy (6) and
unknown kinds keep today's fallback.

The dropdown's Ascent and x Height labels, and Fixed in Gujarati, get
the catalog rows nine languages were missing, beside the new label in
every catalog.

Help page: https://helpx.adobe.com/illustrator/desktop/design-with-text/add-manage-text/add-margins-to-text-and-adjust-the-first-baseline.html
2026-11-16 07:40:47 -08:00
dotCooCoo 60ae8985fc Print: Overprint Black overprints solid black art on separations
The Print dialog's Output section has an Overprint Black checkbox under
Convert All Spot Colors to Process, off by default and available with
Separations (print.setup output.overprintBlack, kept with the document
and in print presets). With it on, solid 100% process K or 100% gray
fills, strokes and characters, and gradients whose every stop (or every
freeform point) is, overprint in the printed copy, so the inks under them
stay on the other plates. Rich, RGB, Lab, spot-linked and lighter blacks
knock out. The document and its own overprint settings do not change, and
composite output ignores the option.

Plates draw an overprinting paint that puts no ink on them as nothing, so
PostScript separations keep the inks below it too. Overprinting character
fills and strokes now darken on PDF plates like fills and strokes, a type
object's own fill in a PDF is drawn with its blending mode, and Edit >
Edit Colors > Overprint Black counts a gradient with a spot-linked stop as
a spot black and a freeform gradient by its color points.
2026-11-16 07:33:12 -08:00
dotCooCoo 33e7a8893b Cut: take the cut objects out of the selection in one pass
Clear with `ids`, which Cut uses for the objects it copied, removed each
id from the selection with its own scan of the selected objects. It now
calls Selection::remove_all once, which gives the same selection.

With 50,000 objects selected and all of them cut, the selection step
takes 5.5 ms instead of 572 ms (release build, median of 7 wall-clock
runs, measured while other builds were running). The new tests compare
the result with removing each id in turn, including Undo and Redo, and
an ignored benchmark times both.
2026-11-16 07:25:45 -08:00
dotCooCoo 52b4b03920 Symbols: render and SVG/PDF export find each instance's symbol in one index
Drawing or exporting a symbol instance looked its symbol up by scanning
the document's symbol list, so a document with many instances and many
symbols spent most of a frame or an export on name comparisons. The
renderer, the SVG and PDF writers and the export walks now find symbols
through SymbolBoxes::symbol, which builds the name index once per frame,
export or walk and returns the first symbol of a name as before.

- Renderer: plain instances, inline graphics, instances with object
  effects (their art and the symbol budget) and the effect bounds.
- SVG export: instance art, symbol defs and their reuse check, and the
  paint reach of filter regions.
- PDF export: instance art, inline graphics and the brush search of
  knockout masks.
- Export warnings and artboard crops measured what each object paints
  with new symbol boxes per object, which built the name index again for
  every instance. painted_bounds_with and drawn_outline_with take the
  boxes once; Object › Rasterize's clipping mask uses them too.
2026-11-16 07:24:45 -08:00
BFlat a6e94de555 Merge pull request #5484 from ruchirguitar/feat/4943-more-indian-languages
Complete #4943: Nepali, Konkani and Sindhi language options
2026-11-16 21:48:41 +07:00
dotCooCoo 9e58e137e1 Merge main into feat/place-linked-eps 2026-11-16 04:24:51 -08:00
dotCooCoo 0b0267159f Place: Link keeps a placed EPS linked to its file, as a placed PDF page already is
File > Place with Link (the default) now places an EPS file, a PostScript file or a PostScript .ai from a path as one locked placed document instead of an embedded group. It shows the art that placing without Link gives (clipped to the bounding box, or the art's bounds with crop: "bounding"). Links check, update and relink it, Break Link and Object > Expand give the Link-false group, a save keeps its preview, every output draws its vectors, and Package copies the file, also from the bytes the document holds when the file is gone. Links lists it as EPS or PostScript, also after a save that kept only its preview. A DCS file stays a linked image; Link off and dataBase64 still embed.
2026-11-16 03:44:23 -08:00
dotCooCoo f8fe5f06e1 .ai graphs: Draw Filled Lines and its Line Width open live and save through the Gy record
A line graph whose style record draws its lines as shapes now opens as a
live graph with Draw Filled Lines on, and its lineShapeWidth becomes the
Line Width (3 pt reads as the default). The flag is ignored when the
points are not connected, as the published file format specification
says (printed pp. 147-148). Saving writes both values in the Gy record.

- Widths from 0.01 to 100 pt are kept. A wider Line Width, a width under
  0.01 pt with filled lines, and filled lines without connected points
  are saved as the graph's art with the existing warning.
- In a filled-line series, a filled path with the thin black band
  outline is read as a band and does not set the series stroke. A
  filled path with another outline must be a square marker or legend
  swatch; otherwise the graph keeps its art as plain objects.
- The reader in crates/eps/src/import/ai/read/graph.rs reads each value
  the writer in crates/eps/src/ai_graph.rs writes; the save-then-open
  tests cover the default, 8 pt and 150 pt widths in both .ai forms.
2026-11-16 03:32:59 -08:00
ruchirguitar eecefd7c9f Merge current main into #4943 language-list PR 2026-11-16 15:17:05 +05:30