Commit Graph
7864 Commits
Author SHA1 Message Date
.CooCoo 0a8c0ee145 Merge pull request #9954 from dotCooCoo/train/carry8285
Stroke: Notched Arrow arrowhead, carried from #8285 with main merged in
2026-11-28 13:37:14 -08:00
dotCooCoo 8285a7b2cf Stroke: a test that stroke.set refuses a bad target with an id
stroke.set names its appearance item through item_target_at as the paint commands do. The test
fails without the change to item_target_at: stroke.set with `target: "content"` and an `id`
answered {objects: 1}.
2026-11-28 12:22:26 -08:00
dotCooCoo 38f28d231b Paint: the early target read names the case it still covers
item_target now reads `target` with `ids` or `id` too, so the comment above the early read in
apply_paint_opacity names only the case it still covers: selected characters take the paint before
item_target runs.
2026-11-28 12:03:06 -08:00
dotCooCoo e87a7f09d9 Paint: a bad target is refused when ids or id names the objects
item_target_at read `target` only when no `ids` or `id` was given, so paint.setFill and
paint.setStroke with an `id` and a target such as "content" painted the object instead of
refusing it, and tests::paintopacity::a_bad_target_is_refused_with_an_id_or_selected_characters
(added in #8099) failed. item_target_at now reads `target` first, for every command that names
its item through it, and the selected-part path no longer needs its own early read.
2026-11-28 12:03:06 -08:00
dotCooCoo 3dfd7393c2 Paint: an opacity call refuses a bad target with an id or selected characters
The opacity path of paint.setFill and paint.setStroke (apply_paint_opacity)
never checked `target` or `aligned`. With `id` or `ids` naming an object,
item_target reads no `target`, so a call such as {"opacity": 40,
"target": "content", "id": ...} painted the object instead of failing.
The test added in 6898eed99 covers that case, and the opacity path from
4f065ccbb (Show Opacity in the Color Wheel panel) merged beside it without
the check, so main's gate failed on
tests::paintopacity::a_bad_target_is_refused_with_an_id_or_selected_characters.

The opacity path now runs the same two checks as the color path
(tool_color_params): appearance::aligned and appearance::targets_contents.
Valid values are read where they were before.
2026-11-28 11:14:37 -08:00
dotCooCoo d07eaa1699 Merge main into train/carry8285
# Conflicts:
#	crates/engine/src/cmd/stroke.rs
#	docs/target-app-parity.md
2026-11-28 08:54:16 -08:00
dotCooCoo 5f907f863a Merge main into feat/plugin-api-context-menus 2026-11-28 08:46:27 -08:00
.CooCoo b24f5af47c Merge pull request #8099 from dotCooCoo/feat/color-wheel-hex-alpha-css
Part of #978: Show Hex Field in the Color Wheel panel takes hex with an alpha and CSS colors
2026-11-28 08:37:09 -08:00
.CooCoo 0c51d3e454 Merge pull request #8962 from dotCooCoo/feat/pattern-brush-scale-pen-inputs
Brushes: Pattern Brush Options' Scale follows the pen's pressure, tilt, bearing, rotation and wheel
2026-11-28 08:36:51 -08:00
dotCooCoo 97316b5ce0 Merge main into feat/color-wheel-hex-alpha-css 2026-11-28 08:20:14 -08:00
dotCooCoo 8087812450 Merge main into feat/pattern-brush-scale-pen-inputs 2026-11-28 08:12:04 -08:00
dotCooCoo a9fda9f97c Merge main into feat/scripts-app-redraw 2026-11-28 08:12:03 -08:00
.CooCoo ab4b8bb64a Merge pull request #9136 from dotCooCoo/feat/plugin-api-generated-art
Plug-ins: generators draw generated art objects that keep their parameters
2026-11-28 08:06:06 -08:00
.CooCoo 7e0381a21f Merge pull request #9910 from dotCooCoo/feat/normal-style-options
Text styles: Style Options edits [Normal Character Style] and [Normal Paragraph Style]
2026-11-28 08:05:56 -08:00
.CooCoo 0198cf9bf4 Merge pull request #9930 from dotCooCoo/fix/select-removal-paints-count
Select: removing a group counts its contents before taking it out of the paints
2026-11-28 08:05:53 -08:00
.CooCoo c2e4966407 Merge pull request #9255 from dotCooCoo/feat/scripts-scriptui-resources
Scripts: ScriptUI builds windows and controls from resource strings
2026-11-28 08:03:55 -08:00
.CooCoo b55413a834 Merge pull request #9094 from dotCooCoo/feat/js-es2015-classes
Scripts: .js scripts define classes with extends, super and new.target
2026-11-28 08:03:33 -08:00
.CooCoo 57b715c359 Merge pull request #9829 from dotCooCoo/fix/previewbounds-memo-flake
Tests: hover memo counts hold plug-ins and hyphenation steady
2026-11-28 08:03:26 -08:00
.CooCoo 8cdd897b23 Merge pull request #9909 from dotCooCoo/feat/windows-thumbnail-handler
Windows: Explorer shows thumbnails of VectorCraft documents
2026-11-28 08:03:20 -08:00
.CooCoo e15a5fcd38 Merge pull request #9914 from dotCooCoo/fix/move-anchors-no-op-undo
Undo: a move by 0 and Layer Options that change nothing add no step
2026-11-28 08:03:15 -08:00
.CooCoo a0890cc87b Merge pull request #9929 from dotCooCoo/feat/scatter-brush-brightness-jitter
Brushes: Scatter Brush Options has Brightness Jitter, a per-copy brightness move
2026-11-28 08:03:07 -08:00
.CooCoo 19fd9548ee Merge pull request #9835 from dotCooCoo/fix/classic-3d-unchanged-approval-b
Keep unchanged 3D options out of Undo and recorded actions
2026-11-28 08:03:00 -08:00
.CooCoo 2fd889ce4d Merge pull request #9922 from dotCooCoo/fix/ai-private-data-streamed
.ai import: editing data whose streams pass 256 MiB opens with its layers
2026-11-28 08:02:57 -08:00
.CooCoo 0d10c2a88d Merge pull request #9927 from dotCooCoo/feat/parametric-shape-slice
Parametric Shape: rectangles, ellipses, polygons, stars and rings cut as slices
2026-11-28 08:02:53 -08:00
.CooCoo af9226f613 Merge pull request #9900 from dotCooCoo/fix/paste-pie-legend-colors
Paste: pies in pasted symbols and patterns follow a merged swatch's wedge colors
2026-11-28 08:02:50 -08:00
.CooCoo e47136ed50 Merge pull request #9905 from dotCooCoo/fix/setliveshape-linked-art
Live Shapes: a new angle, radius or line takes a linked mask and placed gradients along
2026-11-28 08:02:39 -08:00
.CooCoo 5f1eec6cd9 Merge pull request #9291 from dotCooCoo/feat/scripts-document-views
Scripts: Document.views exposes each drawn document window
2026-11-28 08:02:30 -08:00
.CooCoo 503397ab73 Merge pull request #9897 from dotCooCoo/fix/dimension-alt-whole-object-preview-bounds
Dimension: Alt whole-path dimension measures the outside of the stroke with Use Preview Bounds
2026-11-28 08:02:27 -08:00
.CooCoo 2f4bc715db Merge pull request #9901 from dotCooCoo/fix/direct-shift-click-group-member
Direct Selection: a Shift-click on a member of a selected group deselects only that member
2026-11-28 08:02:19 -08:00
.CooCoo deab21a93c Merge pull request #9913 from dotCooCoo/feat/distorted-image-mosaic
Object Mosaic: tiles of a distorted image follow its corners
2026-11-28 08:02:13 -08:00
.CooCoo 072bce3489 Merge pull request #9916 from dotCooCoo/feat/scatter-brush-saturation-jitter
Brushes: Scatter Brush Options has Saturation Jitter, a per-copy saturation move
2026-11-28 08:02:10 -08:00
.CooCoo f9ce5114f0 Merge pull request #9918 from dotCooCoo/fix/envelope-content-box-stroke
Envelopes: a group's own stroke is measured along its members next to type
2026-11-28 08:02:08 -08:00
.CooCoo f59c044080 Merge pull request #9921 from dotCooCoo/feat/move-several-handles
Direct Selection: picked direction handles move together
2026-11-28 08:02:02 -08:00
dotCooCoo 88fb7a8128 Merge main into feat/scripts-document-views 2026-11-28 07:25:53 -08:00
dotCooCoo cae99fee0c Merge main into feat/plugin-api-generated-art 2026-11-28 07:15:42 -08:00
dotCooCoo 4939ac5bd2 Select: removing a group counts its contents before taking it out of the paints
The check that decided between taking removed objects out of the
selection's paints and reading the selection again counted each id once.
Removing a group of 10,000 squares while two squares stayed selected took
all 10,000 fills, strokes and weights out instead of reading the two
squares again.

SelectionPaints::reads_no_more_than now counts the objects that reading
each side meets: each id, the contents of groups, layers, Live Paint
groups and containers inside groups, as the paints read them, and ruler
guides. The two counts go up one object at a time in turn and stop when
either side runs out, so the check itself meets at most twice as many
objects as the smaller side holds.

Two tests in large_edits.rs count the fills read or taken out. Removing
a large group beside two squares fails with the old id count (10,000
fills). Removing a small group beside a large one fails when only the
removed side's contents are counted (10,000 fills).
2026-11-28 06:19:02 -08:00
dotCooCoo 7e2ee5ae03 Parametric Shape: rectangles, ellipses, polygons, stars and rings cut as slices
addon.pathtools.shape.create and addon.pathtools.shape.set take sliceStart
and sliceEnd, in degrees clockwise from the shape's top (0 to 360). The
shape is cut from the start clockwise to the end and back through its
center; a ring's slice runs back along its hole. The angles are measured
as if the shape were as high as it is wide, so 45 degrees is a
rectangle's top right corner and a slice keeps its place when the shape
is stretched along its own axes. The same start and end leave the whole
shape, rounded corners are rounded before the cut, and the arrow, cross,
heart, gear and speech bubble ignore both values. A value outside 0 to
360 is refused. The values are kept with the shape's other numbers and
with the Parametric Shape Tool's options.
2026-11-28 06:11:56 -08:00
dotCooCoo 0a74dcc564 Brushes: Scatter Brush Options has Brightness Jitter, a per-copy brightness move
A scatter brush takes a Brightness Jitter amount from 0 to 100 percent (0
by default). Each copy moves the brightness of its solid fills and
strokes, type included, by its own amount up to that many points either
way, after the colorization and the hue and saturation jitter. The
amounts come from the stroke's path and the brush name, drawn apart from
the hue and saturation jitter's, so a stroke draws the same colors on
every redraw, after Save and Open, and in export, and turning it on does
not change their amounts.

A color keeps its hue and saturation and moves in its own model: RGB in
the HSB of its values, Gray by its ink, Lab by its lightness with a and b
kept, and CMYK by its K over the brightness its C, M and Y leave. A CMYK
color that goes brighter than its C, M and Y show with no K loses its K
and takes less C, M and Y. The brightness stops at black and at full.
White, black and grays move too. A brush at 0 saves no brightness_jitter
key; a brush without the key reads as 0.

- brush.options takes brightness_jitter, and brush.get shows it for every
  scatter brush. Brush Options shows a Brightness Jitter field
  (ui.brushOptions field brightnessJitter).
- Options of Selected Object sets a path's own brightness_jitter
  (brush.objectOptions).
- The brightness goes through the per-copy recolor step hue and
  saturation jitter use, with its own salt.
- The .ai editing data writer does not write the amount, so such a brush
  is left out of the Brushes panel there and reported.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-28 06:07:40 -08:00
dotCooCoo 6f012b6621 File formats: .pcraft documents open and place as one image
File › Open and File › Place read layered raster .pcraft documents
through craft-doc and store them as one PNG, sized by the document's
resolution. A placed file links like any image.

- The image is the file's full-size composite when it has one.
- Without one, the layers are combined at the canvas size when the
  document is RGB at 8 or 16 bits and every visible layer is a raster
  layer that blends Normal, with no clipping, layer effects, vector
  mask, frame, advanced blending or feathered layer mask. Hidden layers
  are not read, and an RGB ICC profile the document names is kept.
- Otherwise the composite preview comes in at the canvas's size, and
  Open, Place, links.update, links.relink and links.replaceEmbedded
  warn when it has fewer pixels than the canvas, naming both sizes and
  why the layers were not combined.
- A full-size composite or preview the file names but doesn't hold,
  can't decode or, for the full-size one, of another size than the
  canvas is an error. The Links commands decode the kept PNG before
  taking it.

The import fuzz tests cover mutated bundles and manifests.
2026-11-28 05:33:55 -08:00
dotCooCoo 6eb0428586 Merge main into feat/plugin-api-context-menus 2026-11-28 05:32:32 -08:00
dotCooCoo 4d1f6cc249 .ai import: editing data whose streams pass 256 MiB opens with its layers
The private data streams of a .ai file, or of a PDF saved with its
editing data, were joined into one buffer of at most 256 MiB before
they were decoded, while the decoded editing data may take up to an
eighth of installed memory (512 MiB to 2 GiB). A file whose streams
passed 256 MiB opened as its PDF part without a note, and a file whose
PDF part can't be read failed with "it is larger than 256 MB".

The streams are now read one after the other and decoded as they are
read, so they are never joined. The decoded data keeps its limit, and
no more of the streams is read than that limit and a sixteenth more.
The data is decompressed after the first compression marker in it.
2026-11-28 05:19:31 -08:00
dotCooCoo 338a5c7a32 Merge main into fix/previewbounds-memo-flake 2026-11-28 05:18:26 -08:00
dotCooCoo ab6a0d44aa Merge main into feat/scripts-scriptui-resources 2026-11-28 05:12:02 -08:00
dotCooCoo 2683ca124b Merge main into feat/pattern-brush-scale-pen-inputs 2026-11-28 05:11:03 -08:00
dotCooCoo 6346157a3a Merge main into feat/js-es2015-classes 2026-11-28 05:07:36 -08:00
dotCooCoo f2975348b9 Merge main into fix/classic-3d-unchanged-approval-b 2026-11-28 05:07:36 -08:00
dotCooCoo 41a6005414 Direct Selection: picked direction handles move together
A click on a path's direction handle picks it, a Shift-click adds it to
the picked handles or takes it away, and Escape lets them go. Picked
handles show ringed. Dragging one of two or more picked handles moves
all of them, on one path or several, by the same offset in one undo
step. A Shift-press on a handle reshapes only once the pointer has moved
3 pixels, so a Shift-click leaves the handle where it is.

The new command path.moveHandles does the move: an anchor with one
handle listed places it as path.setHandle does, an anchor with both
listed moves both and becomes a corner, and independent (Alt during the
drag) makes every listed handle's anchor a corner.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-28 04:58:12 -08:00
dotCooCoo 6cecde4358 Live Shapes: a pixel-aligned shape's pattern follows the snap after a carry
When object.setLiveShape carries a pixel-aligned shape with patterns on, the
final snap to the pixel grid now moves its patterns as well, so the pattern
keeps its place on the shape. With patterns off the pattern stays where it was.
2026-11-28 04:57:58 -08:00
dotCooCoo 895a9c0080 Brushes: Scatter Brush Options has Saturation Jitter, a per-copy saturation move
A scatter brush takes a Saturation Jitter amount from 0 to 100 percent (0
by default). Each copy moves the saturation of its solid fills and
strokes, type included, by its own amount up to that many points either
way, after the colorization and the hue jitter. The amounts come from the
stroke's path and the brush name, drawn apart from the hue jitter's, so a
stroke draws the same colors on every redraw, after Save and Open, and in
export, and turning it on does not change the hue jitter's amounts.

A color keeps its hue and brightness and moves in its own model: RGB in
the HSB of its values, CMYK over C, M and Y with K kept, Lab by moving its
chroma with its lightness and hue angle kept (a and b stay within 127).
The saturation stops at none and at full. White, black and grays stay as
they are. A brush at 0 saves no saturation_jitter key; a brush without
the key reads as 0.

- brush.options takes saturation_jitter, and brush.get shows it for every
  scatter brush. Brush Options shows a Saturation Jitter field
  (ui.brushOptions field saturationJitter).
- Hue and saturation jitter share one per-copy recolor step, which takes
  a salt and a color adjustment.
- Options of Selected Object showed Hue Jitter but dropped a change to it
  on OK, since a path could not set it for itself. A path now sets its own
  hue_jitter and saturation_jitter (brush.objectOptions).
- The .ai editing data writer does not write the amount, so such a brush
  is left out of the Brushes panel there and reported.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-28 04:45:10 -08:00
dotCooCoo 65d9ba2469 Direct Selection: a locked target does not open its group, and a second Shift-click deselects one anchor
expand_to took in the target without checking that it is editable, so a
locked or hidden object inside a selected group replaced the group with
its contents. It now leaves the selection unchanged for such a target.

select.anchors with mode toggle decided whether a path was selected whole
from the rest of the selection, so after a Shift-click had opened a group,
a Shift-click on an anchor of another path in it selected only that
anchor. A toggle on a group member now decides it from the member's own
selection; paths directly on a layer keep the existing rule.
2026-11-28 04:34:32 -08:00