Skip to content

Place: Placement Options clip a DCS image inside its file's clipping path - #7422

Merged
bflatastic merged 4 commits into
storytold:mainfrom
dotCooCoo:fix/dcs-placement-clip-keeps-file-clip
Nov 14, 2026
Merged

bflatastic merged 4 commits into
storytold:mainfrom
dotCooCoo:fix/dcs-placement-clip-keeps-file-clip

Conversation

@dotCooCoo

Copy link
Copy Markdown
Contributor

What and why

When links.update or links.relink read a DCS file again and Placement Options also clipped the image (Fill with Clip, or an aspect change that overflows the old bounds), the placement rectangle replaced the file's clipping path. Plate art outside the file's clipping path then showed and printed.

The file's clip group now stays around the image, and the placement's clip goes in a clip group around that one. The clip group holding just the file's group takes the placement's clip, as a clip group holding just an image does today; otherwise a new one is made. Later updates and relinks reuse the same two groups. A file that loses its clipping path leaves its group as a plain group inside the placement's clip, and gaining it again clips that same group. Images in symbols, graph designs, patterns and opacity masks follow the same rule. docs/mcp.md describes it.

Follows #6932.

How it was tested

  • New tests in crates/engine/src/tests/dcs.rs: placement_options_clip_a_dcs_image_inside_its_files_clipping_path (relink twice, update, then the file losing and regaining its clipping path twice, checking both clip paths and that no group is added) and placement_options_clip_a_dcs_image_in_a_symbol_inside_its_files_clipping_path. Both fail without the change.
  • cargo test -p vectorcraft-engine --lib tests::dcs: 35 passed.
  • cargo test -p vectorcraft-engine --lib tests::links: 62 passed.
  • cargo clippy -p vectorcraft-engine --all-targets -- -D warnings and cargo fmt --all -- --check: clean.

Checklist

  • cargo xtask ci passes (fmt, clippy, tests, assets, brands, layers, wasm).
  • No panics in shipped code: no unwrap(), expect(), panic!, unreachable!, todo! or
    unimplemented! outside tests, and no unchecked indexing on data from files, parameters or
    messages. Errors are returned as Result and shown to the user
    (why and how).
  • Clean-room: nothing copied from Adobe products or GPL/AGPL code (AGENTS.md).
  • Every new asset has a row in ASSETS.md.

…path

When links.update or links.relink re-read a DCS file and Placement
Options also clipped the image (Fill with Clip, or an aspect change
that overflows), the placement rectangle replaced the file's clipping
path, so plate art outside that path showed and printed.

The file's clip group now stays around the image and the placement's
clip goes in a clip group around it. The clip group holding just the
file's group takes that clip, as one holding just an image does today,
else a new one does, so later updates reuse the same two groups. A
file that loses its clipping path leaves its group as a plain group
inside the placement's clip. The same applies in symbols, graph
designs, patterns and opacity masks.
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 124e3cc and 7e8d9bc.

Files selected for processing: 3

  • crates/engine/src/cmd/links.rs
  • crates/engine/src/tests/dcs.rs
  • docs/mcp.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@bflatastic
bflatastic merged commit c8230b4 into storytold:main Nov 14, 2026
7 checks passed
@bflatastic

Copy link
Copy Markdown
Member

Merged, thanks @dotCooCoo! It passed its CI checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants