Commit Graph
5116 Commits
Author SHA1 Message Date
FredApps 31658546a8 fix(codecs): build the cutover against craft-libs d6cd7836d
- Test files whose image→craft-image-codecs rewrites didn't compile against
  main's newer tests go back to main's versions (engine fileio/tests.rs,
  tests_tiffbmp.rs, tests/menucmds.rs, eps tests.rs); they still use the image
  crate, which keeps its format features.
- craft_jxl::encode, craft_image_codecs::encode and Image::icc at d6cd7836d.
- jp2read and pdf export pass DecodeOptions, not Limits.
- EPS DCTDecode: grey JPEGs no longer use the image after moving it, and keep
  main's one-channel output.
- svg keeps its direct usvg dependency for main's image href code; pdf keeps
  jpeg-encoder for CMYK JPEGs.
- clippy -D warnings and rustfmt clean.
2026-11-15 18:05:45 +01:00
dotCooCoo 65b2129138 Live Paint: livePaint.strokeEdge refuses a through id that is not one of the group's edges
`through` now takes only the ids of the group's edges, each once: a face's
id, an unknown id, another group's edge or an edge given twice is an error
and changes nothing. A hidden edge in it is still skipped by the join. For
a double-click the Bucket passes only edges of the group, each once, so an
earlier click that filled a face whose fill was the edge's stroke paint
(Paint Fills and Paint Strokes both on) no longer sends that face.

The Bucket finds the faces a fill drag crossed among those whose bounds
meet the drag's bounds only.

A canvas test covers the middle-button press and the Space-held press
between two Bucket clicks. The progress-doc line lists the new tests, and
docs/mcp.md says which edges the tool passes in `through`.

Follows #7875.
2026-11-15 09:00:15 -08:00
dotCooCoo 24867f7827 Paste: legend labels in a pie's wedges follow wedges that take the document's swatch
When a pasted pie's wedge links a global swatch that the document gives
another color (swatchConflict "merge", the default), the wedge takes the
document's color. Its legend label kept the contrast it had in the copy,
so a wedge that turned dark could show a black label, and one that
turned light a white label, until the pie was drawn again.

Pasting now reads which wedges show a dark fill before the copy is
linked to the document's swatches. A pie whose wedges change darkness
gets the legend label contrast a redraw sets: white on a dark wedge,
black on a light one. Pies whose legend labels have a fill of their own
keep it. This applies to every paste command, Paste without Formatting
included, and to pies inside opacity masks.
2026-11-15 08:53:31 -08:00
dotCooCoo 303d0c0a05 PSD: a version 6 slice record whose ID is 16 is read as a slice
A version 6 slices resource may follow a record with a descriptor of
version 16, and the reader took any record that starts with the value
16 for one. A record whose ID is 16 then had its first bytes read as a
descriptor, and the records after it were misread or left out. When the
records read one after another, followed by nothing or by one
descriptor (the layout ag-psd writes), only the last record is checked
for a descriptor. Files that follow each record with a descriptor are
read as before.
2026-11-15 08:45:10 -08:00
dotCooCoo dc8054fb39 PSD: a slices resource cut short warns that the slices were left out
When image resource 1050 declared more bytes than the image resources
hold, the lookup stopped as if the file stored no slices, and Open and
Place brought the artwork in without the warning that the slices were
left out. The new psdread::resource tells a cut-short resource 1050
apart from one that is absent or that follows another block cut short,
and the slices reader passes that error on, so the warning names it.
Other resource readers keep their behavior.
2026-11-15 08:45:10 -08:00
dotCooCoo cdd4078907 Paste: Paste without Formatting sets pie legend label contrast from merged swatch colors
Paste without Formatting sets each pie legend label in a wedge to white or
black from the wedge colors before it pastes, but a wedge linked to a global
swatch that the document gives another color takes the document's color
only during the paste (swatchConflict "merge", the default). A light wedge
merged into a dark swatch kept a black label, and a later redraw turned it
white.

The copied colors linked to merged swatches now take the document's color
before the labels are set, so the labels match what a redraw sets. Graphic
style links are left for the paste to relink.
2026-11-15 08:42:15 -08:00
dotCooCoo e02faf2293 Merge main into fix/trace-noise-nearest-color 2026-11-15 08:38:54 -08:00
dotCooCoo f0ba18f793 Place: the place cursor keeps an encrypted PDF and asks for its password
file.place.queue read each file without a password, so an encrypted
PDF, .ai or .ait file was skipped and never reached the cursor. It now
stays in the cursor at 612 x 792 pt, VectorCraft's own size, with
needsPassword: true and no thumbnail. A click or drag on it in the app
asks for its password, with the Place dialog's Show Import Options on
or off; headless, a click on it places nothing. A file that fails for
a bad option or for another reason is still refused or skipped.

File > Place of an encrypted PDF given a page and no password, with
Show Import Options on, now asks for the password too, as it does with
the option off; it used to fail for want of the password.
2026-11-15 08:36:54 -08:00
dotCooCoo 0cf2aa3f79 Effects: removing or duplicating several aligned effects of a design's art refuses one that no object has
With the art of a graph design in a series given first and aligned: true,
effect.remove and effect.duplicate with `indices` skipped an effect of the
art that no other object has, and edited the others. With art [shadow,
roughen], a mark [shadow] and indices [0, 1], effect.remove took the
mark's shadow off and succeeded. Such an edit is now an error that leaves
the document and its undo history as they are, as the same index given
alone already was. An object that lacks one of the effects while another
object has it is still left out for that effect.
2026-11-15 08:36:31 -08:00
dotCooCoo 94c815d971 Paint: invert and complement of design art alone still reject a bad target
paint.invert and paint.complement given only the art of a graph design,
with no item, returned success for a target other than "object" or
"contents", because the topmost-fill path read the target only after the
early return for design art. The target is now read before that return.
2026-11-15 08:36:20 -08:00
FredApps 5d492ebad2 Merge #7664 (fix/restore-codec-cutover-ci) into feat/cutover-remaining-codecs
Conflicts resolved in favour of main/#7664 in the 13 source files both touched
(doc/cmyk.rs, metafile/dib.rs, pdf images, svg import/files.rs, render paint and
encode tests, trace, engine load.rs), keeping main's newer TIFF/CMYK, DIB and PDF
image fixes. vectorcraft-doc stays on main's version until its CMYK reader moves
to craft-tiff. The image crate keeps its format features, and usvg, tiff,
zune-jpeg, hayro-ccitt and jpeg-encoder stay for the readers not yet moved.
Codec crates pinned to craft-libs d6cd7836d364177661b0ae17f48a0805e83a5f32.

Also fixes the compile errors CodeRabbit flagged (jp2read DecodeOptions,
filters.rs use-after-move) and the encode() arity at d6cd7836d.
2026-11-15 17:35:43 +01:00
dotCooCoo 133e54b970 Gradients: a gradient spanning the selection on a lower stroke fits the box that stroke paints
With span: "selection", paint.setStroke placed the gradient on the union of
each target's topmost stroke box, also when `item` named a lower stroke,
including an aligned row of a graph design's art. With a 40 pt lower stroke
under a 1 pt topmost one, the gradient reached 0.5 pt past the objects
instead of 20 pt. Each target's box is now that of the row it edits.
2026-11-15 08:34:35 -08:00
dotCooCoo d39334a751 Graphs: a row written to an axis line is kept for its kind
appearance.addFill and appearance.addStroke on an axis line, tick mark
or radar ring stored only the attributes the new row changed on the
line, so a stroke the kind kept from another line came back when the
graph was drawn again, although the line showed the new black stroke.
They now store the row they add for the line's kind when it becomes the
line's topmost visible row of its kind.

An appearance.copyFrom of some attributes, appearance.setItem and
stroke.set stored only what they changed, so a paint, stroke weight,
row opacity or blend mode that the line already showed did not replace
what its kind kept. What they write to the line's topmost visible rows
is now stored for the kind, as paint.setStroke stores the paint it
writes. Row opacity and blend mode are stored apart, so an edit of one
leaves the other as the kind keeps it, and a null weight or opacity
writes nothing.
2026-11-15 08:25:21 -08:00
dotCooCoo 531ce2a10e Effects: Safe Mode checks graph design art that a blurred fill of its series group draws
effect.expandAppearance in Safe Mode left the art of a graph design in a
series out of the plug-in check unless an effect of the series group
itself would draw it. A raster effect on one of the group's fills or
strokes, such as a Gaussian Blur, also turns the whole group into an
image when it expands, art included, so a plug-in effect in that art was
expanded without drawing. Such a raster effect now keeps the art in the
check, and the command returns the Safe Mode error.
2026-11-15 08:07:49 -08:00
dotCooCoo a6b73c467d Merge main into feat/recolor-add-remove-color-tools
Main's New Row and this branch's Add Color tool both make rows with no
current colors. A row made with New Row gives a rewritten color group no
color, and a color the Add Color tool adds joins the group. Rows the Add
Color tool adds now carry `added: true`: recolor.apply's default
groupColors and the dialog's apply_params add only those empty rows'
colors to the group, after the others, and recolor.randomize keeps the
flag.
2026-11-15 07:32:35 -08:00
dotCooCoo a230ea470d 3D (Classic): the Black Overprint shading color shades with overprinting black over the fill
Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic) take
shadingColor blackOverprint. Each face keeps its paint unchanged, and a
face that darkens gets black over it, as strong as the darkening of the
shading color Black: a fill multiplied and overprinting, and a seam
stroke overprinting with Darken. The black is on the black plate in
Separations Preview and is written to PDF as overprinting fills. The
Plastic highlight is not drawn with it.

Preserve Spot Colors draws its black with the same helper, so its seam
stroke no longer multiplies the black a second time along face edges.

The dialogs list the choice, with catalog rows next to Shading Color.
Params text, docs/mcp.md, docs/three-d.md and docs/effects-parity.md
describe it.
2026-11-15 07:31:15 -08:00
dotCooCoo 411310a757 PDF export: Preserve Numbers converts tagged images from their profile
With Output › Convert to Destination (Preserve Numbers), and in PDF/X-1a,
which converts the same way, a gray or RGB image that carries an ICC
profile had its numbers read as sRGB: converted as sRGB to a CMYK
destination, and kept as they were in an RGB one. Preserve Numbers keeps
the numbers of untagged content only, so such an image is now converted
from its profile to sRGB with the color settings' intent, and then to a
CMYK or other RGB destination, the document's own RGB profile included.

- An untagged RGB image keeps its numbers in an RGB destination and
  converts from sRGB to a CMYK one, as before.
- A gray image is converted to sRGB grays in an sRGB destination and
  keeps its profile in the others.
- With RGB colors ICC-tagged as sRGB, the image is written as sRGB.
- A profile the color engine can't read leaves the image as it is in an
  RGB destination, and its numbers read as sRGB in a CMYK one, with a
  warning each.
- The table for an RGB destination is built only when the first tagged
  image needs it.
2026-11-15 07:28:29 -08:00
dotCooCoo ec4a1ac25d PDF export: a set Don't Include Profiles removes image color profiles
When Profile inclusion is set to Don't Include Profiles (`profiles:
"none"`), gray, RGB and CMYK images are written in device color spaces
without their ICC profiles, and a JPEG that is kept as is loses its
APP2 ICC_PROFILE segments. PDF/A-2b, PDF/X-3 and PDF/X-4 keep tagging
their images.

Leaving the setting out keeps the earlier output. `profiles` now
serializes as null when not set, `"default"` clears a preset's value,
and Save PDF > Output lists Default first. Presets and stored settings
saved earlier hold `"profiles": "none"`, so exports from them now drop
image profiles.
2026-11-15 07:27:08 -08:00
dotCooCoo 34e52df5de Crop Image: the Control bar sets the cropped image's resolution, reference point and linked size
While Crop Image shows its box, the Control bar has a PPI list (72, 96,
150, 200 and 300 ppi, with the ones above the image's own disabled) and a
PPI field, a reference point that X and Y name and that W and H resize
about, and a link icon that keeps W and H in proportion. A linked size
that would not fit the image is reduced with the other side in proportion.

object.cropImage takes ppi: the cut pixels are resampled to it, with colors
weighted by their alpha, and the image keeps the box's size. A box over
the whole image with a new ppi only resamples it, and an image scaled
differently across and down comes out with square pixels. ppi is refused
outside 1 to 2400, above the image's own resolution (300 ppi for a linked
image), and with trim. tool.setOption sets ppi, reference and linked for
the Crop Image tool and refuses values it can't use.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-15 07:26:01 -08:00
dotCooCoo 1727c171ef Image Trace: Noise merges a dark speck into the line beside it, not the ground
A region below Noise joined the color it shares the longest border with, so
the specks of a thin dark line on a light ground joined the ground and the
line broke into dashes. When that color is 10 or more apart from the region's
own (Oklab x 100), the region now joins the neighboring color nearest its
source pixels, among the colors sharing at least a tenth of the longest
border. A single pixel tied between colors still joins by border.

6 Colors and 16 Colors move from Noise 15 to 8, and Black and White Logo from
25 to 5.
2026-11-15 07:20:42 -08:00
dotCooCoo d86c9871c6 Live Paint: a triple-click after a release across an edge matches the fill from before it
When a click's press lands in one face and its release in the next, the
drag fills both. The bucket now notes the fill every face the drag
crosses had before the press, the release included, so a double-click
or triple-click that follows on such a face compares that fill instead
of the one the first click gave it. This also holds when the release of
the last click crosses into the clicked face.

When the first click makes the Live Paint group, or merges the selection
into a selected group, the crossed face counts with the fill it was made
with: a kept face's paint from the merged group (an unplaced gradient
fixed to its fit), else the fill Make gives it, the topmost fill that
draws of the front-most source path over it that has one. A selected
group's edges no longer count as source paths.

A double-click whose two clicks land on two joined edges now paints the
edges joined through the other edge its clicks painted:
livePaint.strokeEdge takes `through`, edge ids that the join counts as
drawing with `match`, and the tool passes that edge. When the second
press lands on the next edge and is released back on the first, the
double-click matches the first edge's stroke paint from before the
first click.

A press that the view tools take (held Space, the middle button), or
that holds Cmd/Ctrl and goes to the lent selection tool, now counts as
a press that paints nothing, so the clicks around it are not taken for
one triple-click's: the session tells the tool through the new
Tool::press_elsewhere.

The tool doc, docs/mcp.md and the progress-doc line now say that a click
records an undo step only when it changes a paint, and that a
triple-click paints the faces that have the clicked face's fill (and the
edges that draw with the clicked edge's stroke paint) with the bucket's
paint.

Follows #7291.
2026-11-15 07:19:56 -08:00
dotCooCoo b484a0d1bf Expand Appearance: limit the raster images one expansion makes
Each image of raster effects that Expand Appearance makes, at the top
level, for group members and for symbol instances nested in expanded
art, now draws from one budget of 1,024 images and 256 megapixels per
command. The pixels are counted before the image is made, from the
same region and resolution the image uses. An object or instance whose
image would go past the budget keeps its raster effects and stays as it
is. The result reports how many with `rasterLeft` and a warning, and
when nothing else expands the command fails with that message. A legacy
.ai save notes it the same way.
2026-11-15 07:10:44 -08:00
dotCooCoo f9a2abad18 Paragraph: Kurikaeshi Moji Shori draws a line-start repeat mark as the character it repeats
Paragraph panel menu > Kurikaeshi Moji Shori (text.setFormat
{kurikaeshiMojiShori}) is a paragraph attribute, off by default, saved
only when on and carried by paragraph styles. On, a repeat mark (々, ゝ,
ゞ, ヽ, ヾ) that starts a line of point or area type is drawn as the
character it repeats, with the mark's width, and the text keeps the
mark. Threaded type looks back into the frames before when a paragraph
continues. Live SVG text writes the drawn character and places the
text after it.
2026-11-15 07:02:27 -08:00
dotCooCoo 94d2625c60 Graphs: an appended pick or a swap on a label or axis line keeps only what it changes
appearance.copyFrom with append stored every fill and stroke row a graph
label or line showed for its kind. A fill-only pick appended to one line
or label copied its old stroke over the stroke another one had set, and
the next redraw lost it. The kind now keeps only the kinds of row the
pick adds that are visible in the source, as graphicStyle.apply with add
does, and the object opacity and blend mode only when the pick applies
the object's transparency.

paint.swap on an axis line stored the line's whole fill and stroke rows,
so a fill opacity its kind kept from another line went back to 100%. It
now keeps only the paints the swap changed.
2026-11-15 06:57:45 -08:00
dotCooCoo bb6a8076f3 Brushes: a one-point brush.freehand continuation follows keepSelected
A brush.freehand call that continued a path by one point changed the
path's brush and left the selection as it was. With keepSelected off the
path stayed selected, and with it on the path was not selected, unlike a
longer continuation and unlike what path.freehand's params text says.
The brush edit now selects the path, or deselects it while the rest of
the selection stays, as a longer continuation does. A call that leaves
the brush as it is still changes nothing.
2026-11-15 06:55:16 -08:00
FredApps d8be891693 style: rustfmt the ported variable-library parser 2026-11-15 15:49:08 +01:00
FredApps c9cad8d017 Merge main into fix/restore-codec-cutover-ci
Port main's new variable-library parsing (variable kinds, image, visibility
and graph values) from roxmltree to craft-xml with the branch's strict
options and attribute validation. Keep both sides' variable tests.
Drop the stale docx::nesting doc link.
2026-11-15 15:43:44 +01:00
dotCooCoo 5ed83e0daa Gradients: an aligned row of a graph design's art alone is still checked by paint.editGradient
With only the art of a graph design in a series given, paint.editGradient returned before it checked an explicit aligned item, so a row the art lacks, or one no other object has, was accepted instead of refused. The row is now checked first, as paint.setFill does.
2026-11-15 06:39:46 -08:00
dotCooCoo a098ca4f5c Merge main into feat/variables-import-entry 2026-11-15 06:29:12 -08:00
dotCooCoo bd19ed1623 Variables: Import… in the panel menu reads a CSV or an XML data source
The Variables panel menu gets Import…, which opens one file dialog for
CSV, TSV, TXT and XML files. `variable.import {path}` picks the reader by
the file's extension, in any case: a .csv, .tsv or .txt file is read as
Import Data Sets… reads it, and an .xml file as Load Variable Library…
reads it. Any other extension, or none, is refused before the file is
read. Import Data Sets… and Load Variable Library… stay in the menu.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-15 06:28:41 -08:00
dotCooCoo 85d1da7121 Merge main into fix/pen-input-params-pressure-tilt-rotation 2026-11-15 06:21:36 -08:00
dotCooCoo 614f798d33 Merge main into fix/the-liquify-warning-s-tool-name-and-object-kinds 2026-11-15 06:18:52 -08:00
dotCooCoo f90ac94876 Merge main into feat/diacritic-position 2026-11-15 06:18:24 -08:00
dotCooCoo 8cc99b9294 Merge main into feat/3d-soft-shadows 2026-11-15 06:17:35 -08:00
dotCooCoo 5ce407dfbf Merge main into fix/an-image-whose-recode-fails-is-written-without 2026-11-15 06:17:33 -08:00
dotCooCoo 5d9c5c6297 Merge main into fix/outlined-strokes-under-a-non-uniform-type 2026-11-15 06:17:25 -08:00
dotCooCoo df49d7a5d0 Merge main into feat/packaging-fold-roles 2026-11-15 06:14:42 -08:00
dotCooCoo 3d85f7d617 Merge main into fix/graph-axes-group-edits-kept 2026-11-15 06:09:38 -08:00
dotCooCoo a83c7a8bb3 Merge main into fix/graph-axis-paint-kept 2026-11-15 06:08:10 -08:00
BFlat 3239725c40 Merge pull request #7817 from dotCooCoo/feat/psd-import-options-import-slices-after-7649
PSD: Import Slices brings a file's slices in as user slices on Open and Place
2026-11-15 20:45:50 +07:00
BFlat ea3f81d9c3 Merge pull request #7518 from Taha-Mahmoodi/feat/indic-composers
feat(text): Middle Eastern & South Asian and Standard composers per paragraph (#4935)
2026-11-15 20:45:02 +07:00
BFlat 126f820db2 Merge pull request #4508 from el-j/perf/post-edit-cascade-4502
perf(engine): optimize selection prune and sanity checks for large selections (#4502)
2026-11-15 20:44:54 +07:00
dotCooCoo 42e722e9d0 Expand Appearance: symbol instances with raster effects in a fill or stroke become art, nested ones included
A symbol instance whose topmost fill or stroke has only a shadow or glow
now expands to its art over the effect's image, instead of a live instance
over the image. When the outer instance's art expands, an instance inside
it whose topmost fill or stroke has a raster effect (its own or one the
outer instance passes on) becomes its art too: a shadow or glow becomes an
image under that art, and a blur, feather or inner glow replaces it with the
image. This repeats for the instances in that art, within the nesting depth
and symbol art limits. An instance of a missing symbol stays an instance.
2026-11-15 05:02:52 -08:00
dotCooCoo 6dddffe3e3 Merge main into fix/the-liquify-warning-s-tool-name-and-object-kinds 2026-11-15 03:43:25 -08:00
dotCooCoo 495513f0b6 Pen input: out-of-range pressure, tilt, rotation and size values are refused
The drawing commands that read pen values at their points (path.freehand,
brush.freehand, path.knife, path.eraseRegion, path.eraseSegments,
path.smoothRegion, path.joinScrub and path.blob) now refuse a pressure
outside 0 to 1, a tiltX or tiltY outside -90 to 90 and a rotation outside
0 to 360, naming the key. A tilt was kept within range and a pressure or
rotation was passed on. A point array of more than six numbers is refused,
naming the point, instead of having its extra entries ignored.

path.blob and path.eraseRegion refuse a size outside 0.1 to 1000 pt, the
range of the Blob Brush and Eraser tool options. path.blob refuses a
sizeVariation outside 0 to 1000 pt in every sizeMode and with the mode left
out. path.eraseRegion refuses a sizeVariation over 1000 pt in every mode
with the same message, and a negative one still gives "sizeVariation must
be 0 or more". Each refusal leaves the document, the selection and the
undo history unchanged; null and omitted values still take the defaults.

The tip variation test uses a 1000 pt tip and a 1000 pt Fixed variation,
the largest values path.eraseRegion now takes.

Docs: params text, docs/mcp.md, docs/target-app-parity.md.
2026-11-15 03:28:25 -08:00
BFlat f62932eb93 Merge pull request #7776 from dotCooCoo/feat/aia-files-carry-select-object-steps
Actions: Load Actions… reads .aia Set Selection steps as Select Object
2026-11-15 17:31:10 +07:00
BFlat 8138a6e973 Merge pull request #7814 from dotCooCoo/feat/editing-one-anchor-copies-the-whole-anchor-list
Paths: editing one anchor of a long path keeps one chunk of anchors for undo
2026-11-15 17:31:01 +07:00
BFlat e5951a7dfe Merge pull request #7815 from dotCooCoo/fix/a-reverted-document-keeps-its-uid-so-a-trace
Image Trace: a trace started before Revert does not apply after it
2026-11-15 17:30:52 +07:00
BFlat 20282a13d0 Merge pull request #7807 from dotCooCoo/fix/guide-add-select-allonartboard-select-font-scope
MCP: guide.add and the artboard selections refuse an artboard that is not a whole number
2026-11-15 17:30:38 +07:00
BFlat 1387328255 Merge pull request #7731 from dotCooCoo/feat/svg-filter-user-space-matrix
SVG Filters: a filter on a turned or skewed object is kept on import and drawn
2026-11-15 17:30:29 +07:00