Commit Graph
8834 Commits
Author SHA1 Message Date
dotCooCoo de8cb948ea Live Corners: corners stay live after anchor moves
Moving an anchor of a path with rounded corners (Direct Selection drag,
arrow keys, path.moveAnchor, path.moveAnchors) threw away the live shape
and left the arcs as plain anchors, so the corner widgets disappeared.

The move now goes to the anchor of the uncut outline the drawn anchor
comes from, and the corners are cut again at their radii and kinds. A
live rectangle or polygon becomes a path with live corners. When the
recut changes the anchor layout, the selection is remapped through the
uncut outline and selected segments are cleared.

A path still becomes plain when it has no rounded corner, when a live
rectangle is sheared or scaled unevenly, when an arrow-key nudge bends or
holds curved segments, or for a transform other than a move.

Part of #10545.
2026-12-03 07:45:26 -08:00
.CooCoo a2c62a4a0a Merge pull request #10705 from dotCooCoo/fix/css-dotted-border-note
CSS Properties: evenly spaced round dots are a dotted border without a note
2026-12-03 02:18:36 -08:00
.CooCoo 40060e0943 Merge pull request #10680 from dotCooCoo/fix/pdf-coverage-gaps-batch-11
Tests: cover PDF mesh shadings, restroked glyphs, repeated masks and spot midpoints
2026-12-03 02:03:39 -08:00
.CooCoo 99cbe84d99 Merge pull request #10691 from dotCooCoo/fix/svg-web-export-coverage
Tests: cover SVG font keywords, CSS border styles and Save for Web text cells
2026-12-03 02:03:36 -08:00
.CooCoo bbef8bc4cb Merge pull request #10684 from dotCooCoo/test/docx-place-coverage
Tests: cover the limits and package errors of placing Word documents
2026-12-03 01:47:17 -08:00
.CooCoo 1790c1f1a4 Merge pull request #10678 from dotCooCoo/fix/engine-importer-batch-coverage
Tests: cover import limits, .af blend fallback and action.batch destinations
2026-12-03 01:26:06 -08:00
.CooCoo f765995df8 Merge pull request #10685 from dotCooCoo/fix/undo-group-coverage
Tests: cover three undo group paths no test reached
2026-12-03 01:26:01 -08:00
dotCooCoo 7b51b005eb CSS Properties: evenly spaced round dots are a dotted border without a note
A stroke of evenly spaced round dots (round cap, a zero-length dash, one
gap length, not fitted to corners) is written as `border: ... dotted`, but
the rule also carried the "arrowheads, width profiles, brushes or dashes
fitted to corners" note, and with rasterize on it got a picture as well.
Such a stroke no longer raises that note. Projecting caps, dots fitted to
corners, dots mixed with dashes and unevenly spaced dots keep it.

A gradient border is written with `border-image`, which replaces the
border's style, so its dots or dashes are lost. A dotted or dashed
gradient border now carries the note "dashes or dots on a gradient border".
2026-12-03 00:15:40 -08:00
dotCooCoo 3d69c8d49a Scripts: removeAll cannot leave an image first in a group named Image Trace
textFrames.removeAll() and the removeAll() of a group's pageItems,
groupItems and compoundPathItems checked only clip groups whose mask
they release. Deleting the type or art below an image in an ordinary
group named Image Trace left the image first, so the group was read as
a tracing and the image dropped out of pageItems. Both now throw
"Only Image Trace can make a tracing" and delete nothing, checking the
whole set being deleted at once.
2026-12-02 22:58:00 -08:00
dotCooCoo ebe9e41a33 Tests: check where the spot gradient midpoint lands in the PDF
The test passed "midpoint": 30, which the command clamps to 0.87, and its
tint assertions hold at any midpoint. It now passes 0.3 and asserts the
stitching function's /Bounds[0.3].
2026-12-02 21:57:42 -08:00
dotCooCoo 06e5e28a0b Tests: cover SVG font keywords, CSS border styles and Save for Web text cells
- SVG import: font-size keywords (x-large), larger and smaller against
  the parent's size, and every bolder and lighter step from the parent's
  weight.
- CSS Properties: a round-capped dash starting with 0 gives a dotted
  border, other dashes a dashed one, and a gradient stroke a border with
  border-image. A pen-drawn upright rectangle is written as a rectangle
  with square corners, and the same path rotated gets the note for a
  shape CSS cannot draw.
- Save for Web: a No Image cell over the matte color, aligned right and
  bottom, and an HTML Text cell whose lines are escaped and joined with
  <br>.
2026-12-02 21:55:45 -08:00
dotCooCoo 81263e7c0c Merge main into fix/undo-group-coverage 2026-12-02 21:27:18 -08:00
dotCooCoo 9ec2f5c4bd Tests: cover three undo group paths no test reached
- A document added outside a command while edit.undoGroup.begin is
  open joins the group: its two edits are one "Job" step, and one undo
  takes both back (Session::add_document).
- Canceling a group rewrites a batch's journal entry: a dropped step
  that left another document in front becomes document.activate with
  that index, so the edit made after the group replays in the same
  document (keep_batch_steps).
- Renaming a graph design to its own name succeeds and records no undo
  step, and the design list stays the same.

Each test fails with the covered lines removed.
2026-12-02 21:26:18 -08:00
dotCooCoo 72e99d1c3b Merge main into feat/scripts-layer-text-frames 2026-12-02 21:17:26 -08:00
dotCooCoo c2d242eafa Tests: cover PDF mesh shadings, restroked glyphs, repeated masks and spot midpoints
Adds tests for PDF import and export paths that no test reached:

- A tensor-product patch mesh (type 7) imports as the gradient mesh of
  its boundary, the same mesh a Coons patch over that boundary gives.
- A triangle mesh (type 4) imports as one gradient mesh per triangle,
  each corner in its vertex's color.
- Tensor and triangle meshes over the 16,384-patch limit import as a
  flat gray with a warning.
- The last glyph of a run stroked again in another color splits off
  into its own run; the glyph before it keeps its stroke.
- A masked CMYK image drawn twice at two sizes keeps its opacity mask
  both times, fitted to each drawing; with a mask that hides nothing it
  has no mask either time.
- A one-spot-ink gradient with an off-center midpoint exports a stop at
  the midpoint with the mean tint, still as a Separation shading.

Each test fails with the code it covers broken.
2026-12-02 21:14:39 -08:00
dotCooCoo f1ac779b9f Merge main into test/docx-place-coverage 2026-12-02 21:14:29 -08:00
dotCooCoo 7a066e53b8 Tests: cover the limits and package errors of placing Word documents
Placing a .docx or .doc file had guards that no test reached, so removing
or loosening any of them left every test passing:

- malformed_docx_fails_cleanly now checks the messages for a package with
  no end record, an encrypted part, an unknown compression method and
  ZIP64 end-record values, and that 100,002 empty paragraphs fail with
  "too much text or formatting".
- docx_parts_in_utf16_with_a_byte_order_mark_place_their_text places a
  main part in UTF-16LE and UTF-16BE after a byte-order mark.
- docx_based_on_chains_stop_at_a_cycle_and_after_32_styles places a
  paragraph in a style whose basedOn chain loops, and chains of 32 and 33
  styles where only the last style sets a size.
- docx_run_containers_and_table_rows_nested_past_the_depth_read_are_left_out
  nests runs in smart tags and table rows in content controls 70 and 60
  levels deep.
- malformed_doc_fails_cleanly refuses a .doc WordDocument stream whose
  directory entry gives 64 MB plus one byte.

Each new check fails with the guard it covers broken.
2026-12-02 21:14:29 -08:00
dotCooCoo cd172d1e77 Tests: cover import limits, .af blend fallback and action.batch destinations
- PSD slices: a version 7 or 8 descriptor that lists more than 10,000
  slices, objects nested 17 deep and lists nested 17 deep are refused
  with a warning, and 16 levels of either still open.
- .pcraft: a 12000 x 12000 canvas leaves the preview with the "too
  large to combine" note before any layer is read.
- .af files: Multiply keeps its blend mode, and Linear Light imports as
  Normal with one warning however many objects use it.
- action.batch: an unknown destination is refused, and destination
  "folder" without destinationFolder is refused before any file opens.
2026-12-02 21:08:11 -08:00
dotCooCoo 80569dc577 Scripts: deleting a clipping path cannot make a tracing
remove(), the document's pageItems.removeAll() and textFrames.removeAll()
release the mask of a clip group whose clipping path they delete. A clip
group named Image Trace with an image next above its clipping path then
became an ordinary group named as a tracing with an image first, which
reads as a tracing. They now throw "Only Image Trace can make a tracing"
and delete nothing in that case.

docs/mcp.md names the removeAll() collections that release a mask and
the ones that refuse to delete a clipping path instead.
2026-12-02 20:24:21 -08:00
dotCooCoo 0d8a56cfde Scripts: zOrderPosition reuses the layer list; textFrames.removeAll releases masks
- Layer.zOrderPosition reads the sibling list through the cached layer
  lists, so reading it for every layer of a loop lists the layers once.
  Each read is still charged for the search through the list.
- TextFrames.removeAll releases the mask of a group or layer whose
  clipping path is one of the type objects it deletes, as
  PageItems.removeAll and remove() do, so the object above the type is
  not made the clipping path.
- GroupItems.createFromFile checks that its collection is still there
  first, so a collection whose group was deleted throws "Stale page item"
  instead of the not-available message. docs/mcp.md says so.
2026-12-02 18:44:26 -08:00
dotCooCoo c1470adfc6 Merge main into feat/scripts-text-paint 2026-12-02 18:14:59 -08:00
dotCooCoo e4e6dd517d Merge main into feat/scripts-layer-text-frames 2026-12-02 17:49:12 -08:00
dotCooCoo b51d13d2a4 New document: a replayed rows count over 1000 is kept to 1000
A file.new step replayed from a journal or the Actions panel rounded
artboardLayout.rows and then refused a result over 1000, so a step with
rows 1000.5 or 5000 stopped the playback. The rows count now follows the
columns rule: it is rounded, must be 1 or more, and is kept to at most
1000. Recent stores the kept count. docs/mcp.md says the same.
2026-12-02 17:28:48 -08:00
.CooCoo cd502f08e8 Merge pull request #9073 from dotCooCoo/feat/scripts-api-d1b-prefs-matrix-clipboard
Scripts: app gives scripts preferences, matrices and the clipboard
2026-12-02 17:08:38 -08:00
.CooCoo 5d8deddaf0 Merge pull request #9048 from dotCooCoo/feat/scripts-api-d3-layers-artboards
Scripts: documents give scripts their layers, groups, compound paths and artboards
2026-12-02 16:50:47 -08:00
dotCooCoo dc94ae977c Docs: matrix records passed in need only the six mValue fields
The matrix functions read only mValueA to mValueTY from a record passed
in. The typename "Matrix" is on the records they give back.
2026-12-02 16:10:05 -08:00
.CooCoo e72ff7480d Merge pull request #9062 from dotCooCoo/feat/scripts-api-d8-placed-raster
Scripts: documents give scripts their placed and raster images
2026-12-02 16:07:47 -08:00
dotCooCoo 70504f6dfe Merge main into feat/scripts-layer-text-frames 2026-12-02 16:02:05 -08:00
dotCooCoo 98c6e5fb20 Merge main into feat/scripts-api-d3-layers-artboards 2026-12-02 15:57:11 -08:00
dotCooCoo 44b238b814 Merge main into feat/scripts-text-paint 2026-12-02 15:51:24 -08:00
.CooCoo 822651dc7a Merge pull request #9266 from dotCooCoo/feat/scripts-export-autocad
Scripts: exportFile writes DXF with ExportOptionsAutoCAD
2026-12-02 15:42:04 -08:00
dotCooCoo e369013463 Merge main into feat/scripts-api-d3-layers-artboards 2026-12-02 15:37:51 -08:00
.CooCoo 923fd71b89 Merge pull request #10600 from dotCooCoo/fix/pdf13-transparency-scan
Tests: the PDF 1.3 transparency check reads dictionaries only
2026-12-02 15:30:26 -08:00
dotCooCoo 217c33d46e Merge main into feat/scripts-layer-text-frames 2026-12-02 15:29:55 -08:00
dotCooCoo ab35e04329 Merge main into feat/scripts-api-d1b-prefs-matrix-clipboard 2026-12-02 15:23:31 -08:00
.CooCoo 7e25c134e0 Merge pull request #10613 from dotCooCoo/fix/flatten-raster-fast-png
EPS export: flattened effect rasters are written with fast PNG compression
2026-12-02 15:01:51 -08:00
dotCooCoo b47eaf582c Merge main into feat/scripts-api-d8-placed-raster 2026-12-02 14:14:45 -08:00
dotCooCoo 80eb658aa9 Merge main into feat/scripts-layer-text-frames 2026-12-02 14:12:48 -08:00
dotCooCoo 326c88a8f3 Merge main into feat/scripts-api-d3-layers-artboards 2026-12-02 14:12:01 -08:00
dotCooCoo f24eff2963 PDF: stream length test helper ignores names ending in obj
stream_length took the last "obj" substring in the text as the object
header, so a stream dictionary name such as /Tag/obj moved the scan past
the outer dictionary and lost its /Length. The keyword now counts only at
the start of the text or after PDF white space.
2026-12-02 14:11:32 -08:00
dotCooCoo 1f2e9bff33 Merge main into feat/scripts-export-autocad 2026-12-02 14:02:36 -08:00
dotCooCoo f3c5127a4b Merge main into feat/scripts-api-d1b-prefs-matrix-clipboard 2026-12-02 13:59:55 -08:00
dotCooCoo 3140831da9 Merge main into feat/scripts-text-paint 2026-12-02 13:57:18 -08:00
dotCooCoo 5ce02bb64b Flatten Transparency: write rasterized areas as fast-compressed PNGs
Since #7669 the flattener's rasters have been encoded through the shared
image codec with its default compression (zlib level 6). EPS export, and
any other export that flattens, encodes every rasterized area this way
and then decodes it again right away, so a document with many live
effects exported about 170 ms slower to EPS. The rasters are now written
with PngCompression::Fast, as the SVG filter raster already is
(crates/effects/src/svg_filter.rs). The pixels and the EPS output bytes
do not change.
2026-12-02 13:26:00 -08:00
dotCooCoo d583b8053f Merge main into feat/scripts-pageitem-transforms 2026-12-02 13:09:44 -08:00
dotCooCoo 1576aac89f Scripts: compound path pathItems.index(n) reads the members
`PathItems.index()` with a number went straight to `items_doc`, which
refuses every compound-path-scoped `PathItems` so that creating paths
there stays unavailable. Its siblings (`[n]`, `getByName`, `length`,
`removeAll`) already dispatch scoped collections to the layer handlers
first, but `index` did not, so `compoundPathItems[0].pathItems.index(0)`
threw "creating paths in a compound path is not available yet". Route a
scoped `index` to `scoped_index` like the other lookups; the guard now
only stops real creation.
2026-12-02 12:56:24 -08:00
.CooCoo aeddf2f03a Merge pull request #9077 from dotCooCoo/feat/scripts-api-d8b-tracing
Scripts: PlacedItem.trace and RasterItem.trace make an Image Trace object with its tracing options
2026-12-02 12:37:15 -08:00
dotCooCoo 930c02ce8f Merge main into feat/scripts-pageitem-transforms 2026-12-02 12:20:10 -08:00
dotCooCoo 82ed3b1d70 Merge main into feat/scripts-api-d8-placed-raster 2026-12-02 11:57:33 -08:00
dotCooCoo 5b5ed84c9f Merge main into feat/scripts-text-paint 2026-12-02 11:55:37 -08:00