Repository navigation
Conversation
…nsform and Free Distort A compound path or group with a Transform that scales, rotates or reflects was read live whatever guides it held, and so was a group with a Free Distort that moves a corner. The live effect is measured from bounds that take in the guides, so where a guide reaches past the rest of the object's art, the live effect is placed from a larger box than the art. Such an object now opens as its drawn look. Guides are looked for in members at any depth, a guide in a group inside the object included, and a hidden member counts as art. These keep opening live: a Transform that only moves, a Transform with Transform Objects off, a Free Distort on a compound path, and objects whose guides lie inside the rest of their art. The `.ai` writer keeps a graphic-style link only where the reader reads the style live, so such an object is now written without the link, with the existing style-link warning.
Contributor
|
Warning Review limit reachedYou'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 33 seconds. View limit details
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. |
This was referenced Nov 14, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Follows #7345. In a
.aiopened from its editing data, a compound path or group with a Transform that scales, rotates or reflects was read with the effect live whatever guides it held, and so was a group with a Free Distort that moves a corner. The live effect is measured from the object's bounds, and those bounds take in its guides. When a guide reaches past the rest of the object's art, the live effect is placed from a larger box than the art.guides_reach_past(crates/eps/src/import/ai/read/ops.rs) now looks into groups as well as compound paths, and into their members at any depth (deeper thanMAX_DEPTHcounts as reaching past). It compares the bounds of every guide with the bounds of the rest of the art. A hidden member counts as art.moves_withuses it for Transform (when it scales, rotates or reflects and Transform Objects is on) and for Free Distort on a group (when it moves a corner). Such an object opens as the file's drawn look with the existing "drawn look" warning. This is VectorCraft's own rule..aiwriter keeps a graphic-style link only where the reader reads the style live (object_readscallsstyle_moves_with, which callsmoves_with), so such an object is now written without the link, with the existing style-link warning. The writer code is unchanged.docs/file-format-parity.mdanddocs/target-app-parity.mdstate the exception.This changes how existing files open: a compound path or group whose guides reach past the rest of its art opens as its drawn look instead of live under a Transform that scales, rotates or reflects, and a group does under a Free Distort that moves a corner. A guide one group deeper inside the object counts too.
How it was tested
New tests in
vectorcraft-eps:import::ai::tests::transform_and_free_distort_keep_the_drawn_look_where_a_guide_reaches_past_the_rest_of_the_art: a compound path or group with its guide inside, moved, with Transform Objects off (with Transform Patterns off or on), a compound path with Free Distort, a group with Free Distort that moves no corner, and a guide past a square but inside a hidden member open live with the effect and no warning. A compound path scaled, turned or reflected, a group scaled, turned or distorted, and a group whose guide is in a group or compound path inside it, each with a guide past the art, open as the drawn look with the "drawn look" warning. It fails with the guide check removed from Transform or from Free Distort, and with the Transform Objects exemption removed.ai_editing::tests::a_link_to_a_transform_or_free_distort_style_with_a_guide_is_kept_where_the_reader_reads_it: the style link is kept on a compound path with its guide inside, moved, scaled with Transform Objects off (Transform Patterns off or on), or distorted, and on a group with the guide inside; it is dropped with the style-link warning where a scaled compound path or group has its guide past the art. It fails with the guide check removed.Focused checks on the final tree, on Linux. The branch is one commit on
mainat1e4e3534f5. The checks:cargo fmt -p vectorcraft-eps -- --check: clean.cargo fmt --all -- --checkreports onlycrates/svg/src/lib.rs:491, which is onmainat1e4e3534f5without this branch; open Fix main CI after the craft-libs migration (fmt, wasm) #7407 and fmt: format crates/svg/src/lib.rs #7400 fix it.cargo clippy -p vectorcraft-eps --all-targets -- -D warnings: clean.cargo check --workspace --tests: clean.cargo test -p vectorcraft-eps: 1,565 unit tests and 1 integration test passed, 0 failed.cargo xtask brands: no vendor names;cargo xtask layers: 30 crates, no layering violations;cargo xtask assets: all 337 asset files attributed.cargo xtask ciruns in this pull request's CI.This branch and #7383, #7367 and #7103 each change the same paragraph of
docs/file-format-parity.md, so whichever merges later needs that paragraph merged by hand to keep both clauses; their code files merge cleanly.Checklist
cargo xtask cipasses (fmt, clippy, tests, assets, brands, layers, wasm).unwrap(),expect(),panic!,unreachable!,todo!orunimplemented!outside tests, and no unchecked indexing on data from files, parameters ormessages. Errors are returned as
Resultand shown to the user(why and how).
ASSETS.md.