Swatches: a new swatch holds no link or placement from the paint it is made from

swatch.new stored a gradient or pattern as it was given. A gradient
swatch made from a gradient swatch by name, from a fill linked to one,
or from a gradient that names one (the Gradient panel's add to
swatches) kept the link to that swatch, so copying art that uses the
new swatch brought the other swatch along too. A pattern swatch made
from a current fill picked up from art with transformed tiles kept
that transform, and art the swatch was applied to took it in place of
its own.

The new swatch now drops the gradient's link and stores the pattern
untransformed. A gradient swatch keeps its aspect as before.
This commit is contained in:
dotCooCoo
2026-11-09 00:35:30 +07:00
committed by bflatastic
parent cae5b356c7
commit 50bf521d45
4 changed files with 82 additions and 3 deletions
+2 -1
View File
@@ -597,7 +597,8 @@ global or spot swatch follow its colour and name, as one undo step, in the art,
designs, pattern tiles, graphic styles and the art of brushes); `swatch.delete {names, unlink?}` deletes
swatches and colour groups in one undo step (art using a deleted global swatch keeps its colour, unlinked).
`swatch.new {color?, mode?, spot?, global?, group?}` saves a colour (into a colour group with `group`), gradient
or pattern; `swatch.newGroup {fromArtwork: true, toGlobal?, includeTints?}` makes a colour group of the selected
or pattern (a gradient swatch holds no link to the swatch its gradient came from, and a pattern swatch holds the
pattern untransformed); `swatch.newGroup {fromArtwork: true, toGlobal?, includeTints?}` makes a colour group of the selected
art's colours (by default as global swatches the art links to).
`swatch.move {names, to?, group?}` reorders swatches or moves them into or out of a colour group (as dragging
them in the Swatches panel does); give colour group names instead to reorder the groups. Dropping a swatch on art