Commit Graph
1498 Commits
Author SHA1 Message Date
.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 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
dotCooCoo cae99fee0c Merge main into feat/plugin-api-generated-art 2026-11-28 07:15:42 -08:00
dotCooCoo a03b3355c9 Envelopes: a group's own stroke is measured along its members next to type
The box an envelope maps from measures a group or layer that holds type
member by member, so that type is measured by its glyph outlines. In that
walk the container's own strokes still grew every member's box by
Appearance::outset(), the farthest a miter-joined stroke can reach. A
10 pt stroke of the group's own round a square next to type reached 50 pt
past the square instead of the 5 pt it paints.

The walk now measures the container's strokes, scaled into the envelope's
frame, along each member as the group's visual box does: paths and
compound paths along their shapes (Node::painted_by_container), groups
holding type member by member, and nothing round hidden members and
guides. Type, clip groups and compound shapes keep their box grown by the
strokes' reach, with their own strokes scaled into the frame.
2026-11-28 04:51:08 -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
dotCooCoo 33dc1f2d7b Bounds: a group's own stroke is measured along its members' shapes
A group's or layer's visual box grew by Appearance::outset(), the farthest
any of its strokes can reach from any path. For a miter-joined stroke that
is the miter limit times half the weight, so a 10 pt stroke of the group's
own round a square measured 50 pt past it instead of the 5 pt it paints.

The container's own strokes are now measured along each member path and
compound path, at any depth in its groups, as a path measures its own
strokes (Appearance::stroked_bounds). They add nothing round hidden members,
guides, images and symbol instances, which they do not paint, and grow the
box of other members (type, clip groups, live objects) by their reach as
before. visual_of_members keeps the old growth for callers that have only
boxes at hand.

The box of a group measured in a turned frame (Node::bounds_in) and
object.setBounds with Use Preview Bounds, which measures plain groups member
by member and symbol art object by object, measure a group's own strokes the
same way, so the size setBounds gives matches the visual box. There, too,
the strokes stop at hidden members and guides, and setBounds measures a
compound shape as one object, as its visual box takes it. A group's
own beveled or mitered stroke along a path with slanted segments now counts
as a slanted stroke corner (Node::has_slanted_stroke_corners), so setBounds
measures such a group as drawn when it sizes it out of proportion.
2026-11-28 03:56:47 -08:00
dotCooCoo 419bf845bd Dimension: a preview-bounds dimension updates when its path becomes a guide or is released
art_changed compared only the strokes a path paints, so a dimension placed before the path was made into a guide kept measuring its stroke, and one placed on the guide kept the bare size after Release Guides. A change in guide state now counts as a change to the art for a Use Preview Bounds dimension of a whole path.
2026-11-28 03:56:13 -08:00
dotCooCoo 28af430081 Dimension: a guide's preview bounds leave out its stroke
A path made into a guide paints no strokes, but painted_box still measured its
stroke, so a Use Preview Bounds dimension of a whole guide reached past its
outermost points. painted_box now returns None for a guide, which covers both
preview_extents and reach. The parity note says W and H match only when the
path has no geometry effect, in line with docs/dimensions.md.
2026-11-28 03:31:46 -08:00
.CooCoo b335904091 Merge pull request #9888 from dotCooCoo/feat/ai-inline-placed-eps
.ai import: a placed EPS file whose bytes the editing data includes opens as a placed document
2026-11-28 03:14:10 -08:00
dotCooCoo 3e8d293232 Direct Selection: a Shift-click on a member of a selected group deselects only that member
With a group selected, a Direct Selection Shift-click on the fill of one of its paths ran
select.toggle on the path, which added the path beside the group. The path stayed selected
through the group, and so did everything else in it.

The new select.remove command takes each target out of the selection. For a target inside a
selected group or compound path, Selection::expand_to first selects the objects inside the
outermost selected one on the way down to the target, in its place, so the rest of the group
stays selected. Hidden and locked objects and a Shaper Group's original shapes are left out. Direct Selection's Shift-click on such a path runs select.remove, and a
Shift-drag from there moves nothing. A Shift-click on one of the path's anchors runs
select.anchors with mode toggle, which now opens the group the same way and deselects only that
anchor. A path selected beside the group around it, as Group Selection leaves it, is taken out
with the group.

No public documentation describes this case, so this is VectorCraft's own rule.
2026-11-28 02:20:39 -08:00
dotCooCoo 23db97a4bd Dimension: Alt whole-path dimension measures the outside of the stroke with Use Preview Bounds
With Use Preview Bounds on, the box Alt shows over a path and the linear
dimension of the whole path it places now reach the outside of the
path's strokes, the width or height W and H show, instead of the
outermost anchors.

- The extent source records `preview: true` (omitted when false), so the
  dimension measures to the outside of the strokes again after later
  edits, a new stroke weight included. Files without it measure as
  before.
- A member of a compound path is measured with the compound path's
  strokes and only the arrowheads the compound path draws on that member.
  Releasing the compound path or changing which member holds the first
  or last subpath measures it again.
- The dimension line stays outside the stroke.
- `dimension.create` takes `preview` on the extent source; a value other
  than true or false is an error.

Geometry effects are not included.
2026-11-28 02:06:27 -08:00
dotCooCoo 3499b7d7aa Merge main into feat/select-inside-unfilled-shape 2026-11-28 01:41:16 -08:00
dotCooCoo fda03c81ed .ai import: a placed EPS file whose bytes the editing data includes opens as a placed document
A .ai file's editing data can include a placed EPS file's bytes between
%%BeginDocument: and %%EndDocument. The reader did not read those bytes:
in the %AI5_BeginPlace form the placed file showed only the preview the
data keeps of it, or an unread placeholder box without one, and in the
version 7 form the art the file draws came in as editable paths with a
note that placed files weren't read.

- The reader keeps those bytes (up to 256 MB) and makes the placed file a
  placed document of them, in the file's bounding box where the
  matrix puts it. It draws its art whether or not its file is found, and
  a native save keeps the bytes. The version 7 form's placed EPS art is
  no longer editable on open.
- A placed file stays as before when its bytes are a DCS file (File >
  Place makes those linked images), have no bounding box of their own,
  carry a VectorCraft document (as VectorCraft's EPS export writes),
  don't read as an EPS file, or belong to a file named .ai or .ait.
  What reading the bytes warns of is in the open result.
- One with a preview that an image variable binds stays the linked image
  showing its preview, as a placed PDF page does.
- The link takes the size and hash of the bytes, so a file found unchanged
  is neither missing nor modified.
- Drawing and the open check each read at most 8 placed EPS files inside
  one another, so a file whose included files include others opens.
  The open check draws the placed documents inside the bytes from their
  previews, and it reads each included file once at each depth. A file
  nested 12 levels deep opens with at most 8 drawing reads and 72
  checks.
- File > Package with Copy Fonts reads the type of a placed EPS file, as
  it reads a placed PDF page's, and of the EPS files it includes in turn,
  pattern art included.
- On %_ lines the %_ that starts each line is taken off. Then one line
  end is taken off the end of the bytes when another line end comes
  before it: the one the %%BeginDocument: line ends with when the bytes
  end with it, otherwise the last one. An LF after a CR is kept with it
  when the file's first line ends with CRLF.

Docs: docs/target-app-parity.md.
2026-11-28 01:16:09 -08:00
.CooCoo 3c7a3c7904 Merge pull request #9881 from dotCooCoo/fix/stroke-hit-cap-dots
Strokes: a click on the dot a round or projecting cap draws for a lone anchor hits the path
2026-11-28 00:48:03 -08:00
dotCooCoo 1ad7a1134f Merge main into feat/plugin-api-generated-art 2026-11-27 23:35:47 -08:00
.CooCoo 9ce2299580 Merge pull request #9811 from dotCooCoo/fix/ai-envelope-stroked-line
.ai import: envelopes of a stroked straight line map from their stroked box
2026-11-27 23:35:45 -08:00
dotCooCoo dc2f212acd Strokes: a click on the dot a round or projecting cap draws for a lone anchor hits the path
A round or projecting cap draws a dot for a subpath that never leaves
its first point: a closed lone anchor, or a line or curve back to the
same point. StrokeLayer::hits ruled the click out by the box of the
segments, which leaves out a closed lone anchor, and then measured
only segments with length, so a click on the dot missed. The fast
path for a plain centered stroke in hit_leaf also returned no hit for
a path whose only subpath is a closed lone anchor.

hits now measures each such subpath as the dot the stroke draws: a
disc for a round cap and an axis-aligned square for a projecting cap,
as wide as the stroke's body, on undashed strokes without a width
profile, which are the strokes that draw a dot. Inside and outside
strokes keep to their side of a closed path. Butt caps draw no dot
and still miss. The fast path hands a click near a closed lone anchor
to the full check.

Hover, Select Behind, Direct Selection and the Eyedropper go through
the same hit test, and a marquee over the anchor already selects it.
2026-11-27 23:30:58 -08:00
.CooCoo a91c38ee5c Merge pull request #9868 from dotCooCoo/fix/effect-bounds-lone-anchors
Effects: bounds hold the dot a closed lone anchor draws
2026-11-27 22:17:43 -08:00
.CooCoo 68f4d94d8b Merge pull request #9806 from dotCooCoo/fix/outline-placed-geometry-effects
Outline view: effects reshape a placed document's crossed box
2026-11-27 22:16:43 -08:00
dotCooCoo ee976e1b78 Docs: envelope margins name the 1e-6 pt side threshold
A side of an envelope's content shorter than 1e-6 pt, not only one of
zero length, has its margins measured as shares of the other side
(envelope_margin_lengths). docs/mcp.md, the object.envelope.info params
text and the bounds_margin doc comment now state that threshold.
2026-11-27 22:03:04 -08:00
.CooCoo 5fe987ee2d Merge pull request #9860 from dotCooCoo/feat/ctrl-click-select-behind
Selection: Cmd/Ctrl-clicks step through grouped objects under the pointer
2026-11-27 21:44:40 -08:00
dotCooCoo b73f28dc71 Effects: bounds hold the dot a closed lone anchor draws
A round or projecting cap draws a dot for a closed subpath of one anchor.
The bounds the effects are measured by left that dot out: the visual and
cull bounds, the box Rasterize makes its image over, and the reach of an
effected path's raster effects. A path of only lone anchors was measured
at the origin.

- `vectorcraft_geom::path::drawn_curve_bounds` measures a kurbo path as
  `PathData::drawn_bounds` measures the anchors it stands for.
- `crates/render/src/fx` measures effected paths with it, and a path that
  draws nothing by its anchors, as `Node::visual_bounds` does.
- A stroke measured along its segments (miter and bevel joins, projecting
  caps) gives the dot of a closed lone anchor its reach.
2026-11-27 20:21:07 -08:00
dotCooCoo 1d66710671 Selection: Cmd/Ctrl-clicks step through grouped objects under the pointer
With the Selection tool, the first Cmd-click (Ctrl on Windows and Linux)
now always goes to Direct Selection or Group Selection, also over a
selected object: it picks the object under the pointer, a member of a
group included, and arms Select Behind. While Cmd stays held, each
further Cmd-click over the selection selects the next object under the
pointer, counting the members of groups one by one, and comes back to
the topmost after the last. Letting go of Cmd (a pointer, hover or key
event without it), choosing another tool or switching documents ends it.

Before, the first Cmd-click over a selected object selected the object
behind it at once, and Select Behind stepped through whole groups, so a
member lying under another member of the same group could not be
reached that way.

- doc::hit::leaves_at lists the objects a Direct Selection click picks
  under a point, topmost first, in one traversal of the document; a
  clipping mask or a group drawn with its own geometry effects falls back
  to repeated hit tests. The list stops at 256 objects.
- The session keeps the arming (Session::behind_armed) and passes it to
  the tools as ToolContext::behind_armed.
- Docs: docs/control-protocol.md (ui.pointer), docs/mcp.md,
  docs/target-app-parity.md and docs/ui-parity.md.
2026-11-27 18:47:39 -08:00
dotCooCoo 9d54c7ccec Paths: a lone anchor widens the visual box only where a stroke draws it
The previous commit made PathData::bounds hold the point of a subpath of
one anchor. Node::visual_bounds measures a path from that box, so a lone
anchor that draws nothing (an open one, or a closed one under a butt cap
or with no stroke) widened the visual box by the stroke's reach. The
renderer draws a lone anchor only as the dot of a round or projecting
cap on a closed subpath (point_dots in crates/effects/src/stroke.rs).

- PathData::drawn_bounds measures the segments, and the lone anchors of
  closed subpaths when a cap draws dots. Node::visual_bounds measures
  paths and compound paths from it, falling back to the geometric box
  when nothing is drawn. Geometric bounds still hold every lone anchor.
- The .ai envelope import's box of what type's outlines paint relied on
  PathData::bounds leaving lone anchors out. It now removes contours of
  zero length from the baked pieces before measuring them, so
  a_contour_of_zero_length_paints_nothing passes unchanged.
2026-11-27 15:33:20 -08:00
dotCooCoo 5433e02d8e Selection: a click inside an unfilled closed shape selects it
With Object Selection by Path Only off (the default), the Selection,
Direct Selection and Group Selection tools, Object Highlighting and a
right-click's selection now pick a closed path or compound path that
has no fill by a click inside its closed subpaths. Before, such a shape
could only be picked on its path, and a click inside started a marquee.

The inside counts only where no other object is hit: a click first
looks for what paints at the point, the same as before, and only then
for the topmost unfilled closed shape around it, so art drawn inside a
frame is still picked before the frame. Select Behind lists those
shapes after the objects that paint there, and Direct Selection in a
dynamic symbol's art picks parts in the same order. Open paths, guides
and clipping paths are still picked by their path only, and Outline
view is unchanged. With Object Selection by Path Only on, the inside of
an unfilled shape takes no click, as before.

Three tests clicked inside an unfilled square and expected nothing to
be selected: the Selection and Direct Selection center point tests and
the outside-stroke reach test. They now run with Object Selection by
Path Only on, and the Direct Selection and stroke reach tests also
check that the click selects the square with it off.

Fixes #9175
2026-11-27 13:49:28 -08:00
dotCooCoo 823619c46e .ai import: envelopes of a stroked straight line map from their stroked box
An envelope whose file saves the size of its contents with their
strokes maps from that box, with margins stored as shares of the
contents' height and width. A straight line along an axis has no
height (or no width), so it got no margins and mapped from its
zero-height geometric box instead.

Margins along a side with no length are now shares of the other
side's length (envelope_margin_lengths). The reader, the envelope's
map, leaving Edit Contents and the .ai writer all measure through it,
so a stroked line opens mapping from its stroked box and saves that
box's size again.

Docs: object.envelope.info params text, docs/mcp.md,
docs/target-app-parity.md.
2026-11-27 13:45:00 -08:00
dotCooCoo 6245d6b118 Outline view: effects reshape a placed document's crossed box
In Outline mode without Show Images in Outline Mode, a placed document
with an effect that changes geometry (Transform, Roughen, plug-in
effects), its own or its group's, drew its file's art reshaped and
without the X. The effects now reshape the crossed box instead, so a
Transform effect moves the crossed box.

- While a frame draws placed documents crossed, a placed document's art
  is its box with both diagonals (PlacedDocument::crossed_art), so every
  effect and evaluation that reads that art uses the crossed box.
- Layers are drawn and measured in the mode their Layer Options give
  them: a template layer in Outline view still shows the file's art,
  and a layer or sublayer whose Preview is off shows the crossed box.
  A layer with effects of its own now follows its Layer Options too;
  before, it drew in the view's mode.
- Kept effect art, cull bounds and the areas redrawn after an edit are
  measured in that mode and kept apart per mode.

Docs: docs/ui-parity.md row done, docs/mcp.md outlineImages.
2026-11-27 13:30:42 -08:00
ruchirguitarandClaude Opus 5.5 4c36d9a9cc Merge main into the Document Info path area branch
docs/gaps.md conflict: both evidence paragraphs kept, this branch's first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 19:53:29 +05:30
ruchirguitarandClaude Opus 5.5 2d497db368 Merge main into the Document Info path area branch
Docs conflicts: main's "Last updated" banner; both sides' evidence and
history rows, newest first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 13:59:24 +05:30
dotCooCoo f391e8f952 Initialize guide labels in artboard test fixtures 2026-11-26 23:17:29 -08:00
.CooCoo 9b914feb20 Merge pull request #4481 from el-j/fix/artboard-copy-oversized-art-4479
Fix #4479: duplicate and Alt-drag copy artwork larger than artboard
2026-11-26 21:29:53 -08:00
dotCooCoo 1715d85828 Merge commit 'refs/check/mac2-20261126-properties-fixed' into HEAD 2026-11-26 15:42:32 -08:00
dotCooCoo df0ee01cf2 Unit Converter: reject ambiguous commas in expressions 2026-11-26 14:20:18 -08:00
dotCooCoo f7d39bce07 Merge main into feat/plugin-api-generated-art 2026-11-26 10:13:31 -08:00
dotCooCoo 93a5d81d2e Merge main into feat/scripts-api-d7b-tags-notes-uuid 2026-11-26 09:34:56 -08:00
dotCooCoo 38d4832ef2 Merge main into fix/selection-marks-skip-view-hidden-members 2026-11-26 07:14:22 -08:00
BFlat 1a960da2d3 Merge pull request #9116 from dotCooCoo/feat/plugin-api-filter-type-images-symbols
Plug-ins: filters at API level 3 change type, images and symbol instances
2026-11-26 16:51:11 +07:00
BFlat 6ab2d4c25d Merge pull request #9372 from dotCooCoo/fix/transform-guide-path-ids
Guides: a transform's reply lists the guide paths it makes of ruler guides
2026-11-26 16:44:57 +07:00
dotCooCoo 562bec3f1e Merge main into feat/scripts-api-d7b-tags-notes-uuid 2026-11-25 23:07:28 -08:00
dotCooCoo 272c24a119 Selection: a selected group leaves out guides and templates the view hides
A selected group or layer outlined and marked a member made into a guide
while the guides were hidden, and the art of a template sublayer while
View > Hide Template was on, although the canvas does not draw them.

- Node::hidden_by_view (crates/doc/src/node/ops.rs) holds the rule; the
  renderer's left_out now uses it too.
- walk_drawn and the overlay's point limit in canvas/outline.rs leave out
  the members the view hides, so the selection's outlines, key outline,
  anchors, hover outline and point count skip them.
- The selection's bounds are unchanged.
2026-11-25 22:40:11 -08:00
dotCooCoo b5d62ade36 Selection: a turned or skewed symbol instance is outlined along its frame
The selection outline and the hover highlight drew a symbol instance as
the box square to the page around it, so a turned, skewed or
perspective instance showed a box larger than its frame. Type in
perspective had the same box.

Node::drawn_corners gives the four corners of an instance's art box
placed by its transform, and of type's flat bounds, both through the
projection of an object in perspective. node_outline joins them, as it
already does for a placed document's corners.
2026-11-25 22:19:27 -08:00
dotCooCoo 9c34c3a2fa Guides: a transform's reply lists the guide paths it makes of ruler guides
A selected ruler guide that a transform turns to an angle becomes a
selected guide path, but the reply's ids left it out: object.rotate
with copy on a lone guide returned {"ids": []}. transform_ruler_guides
now returns the ids of the paths it adds, and the transform commands
add them after the transformed objects, on the direct-selected anchor
route too.
2026-11-25 21:51:20 -08:00
dotCooCoo 132d2da4a1 Merge main into feat/plugin-api-filter-type-images-symbols 2026-11-25 19:01:04 -08:00
dotCooCoo 594ebcb6e3 Merge main into feat/plugin-api-generated-art 2026-11-25 18:46:05 -08:00
BFlat dc0c47a9a3 Merge pull request #9329 from dotCooCoo/feat/rotate-ruler-guides
Guides: selected ruler guides rotate with the Rotate tool and Object › Transform › Rotate
2026-11-26 08:48:18 +07:00
dotCooCoo 29d6542c9f Merge main into fix/selection-marks-skip-hidden-members 2026-11-25 15:07:56 -08:00
dotCooCoo aeb1e82b57 Merge main into feat/plugin-api-generated-art 2026-11-25 14:58:37 -08:00
dotCooCoo c0fd2170d0 Merge main into feat/plugin-api-filter-type-images-symbols 2026-11-25 13:59:45 -08:00
dotCooCoo 05b6a15d48 Guides: selected ruler guides rotate with the Rotate tool and Object › Transform › Rotate
A selected ruler guide was left out of every transform but a move: the
Rotate tool did nothing with only guides selected, and Object › Transform
› Rotate… refused with "nothing selected".

Each selected ruler guide now transforms as the line Release Guides makes
of it (across its artboard, or across the artboards' bounds for a canvas
guide), about the center of the selected objects' box and those lines
together. A guide that ends up vertical or horizontal stays a ruler guide:
a half turn keeps it and a quarter turn makes a horizontal guide vertical.
At any other angle it becomes a guide path along its line, on the guide's
layer, so it snaps, releases, locks and saves as other guide paths do.

- Object › Transform › Rotate… (Copy included), Transform Again and the
  Rotate tool's drag and Alt-click work with only guides selected, in one
  undo step. A turn that leaves the guides where they were records none.
- Scale, Reflect, Shear and the bounding box now transform selected guides
  along with the selected objects and direct-selected anchors, where
  before the guides stayed put.
- Locked and hidden guides, guides with ids given and guides with
  Transform Objects off do not transform. `absolute` with only guides
  selected is an error.

Part of #2418.
2026-11-25 10:37:15 -08:00