SVG spritesheets: pack, merge, rasterize

Packing an SVG sheet makes a new SVG holding its drawing once (as a symbol),
each region a clipped view of it at its new place; merging makes an SVG
whenever any sheet is one, with PNG sheets embedded as images (the merged
sheet's file name takes the matching extension). Both go through
Image::compose, which also does the pixel versions, so merge_append is gone.
Vector sheets save as their SVG (autosaves too, and images load as PNG or
SVG by content), and their asset key includes the SVG. Rasterize in the
Spritesheets menu turns selected SVG sheets into PNGs beside them, with a
toast for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-10-21 00:15:56 -04:00
1 parent bec89bf48f
commit 5f01e8065d
14 files changed
+316 -82

No files matched your search

+1 -1
View File
@@ -216,7 +216,7 @@ TEST_CASE("converting SVG spritesheets writes PNGs beside them")
Document document(directory / "vector.anm2", false);
REQUIRE(document.is_valid());
document.spritesheets_vector_convert();
document.spritesheets_vector_convert({0});
CHECK(document.model.content.spritesheets.front().path == "vector.png");
CHECK(std::filesystem::exists(directory / "vector.png"));
REQUIRE(document.texture_get(0));