From f2312f85feca34465909dbb4ce39c9b2317b4e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Capello?= Date: Mon, 27 Jun 2022 16:48:29 -0300 Subject: [PATCH] Test that exporting a sprite sheet uses the correct mask color index when spacing > 0 (test https://github.com/aseprite/aseprite/issues/3391) --- scripts/app_command.lua | 15 +++++++++++++++ sprites/2f-index-3x3.aseprite | Bin 0 -> 616 bytes sprites/README.md | 2 ++ 3 files changed, 17 insertions(+) create mode 100644 sprites/2f-index-3x3.aseprite diff --git a/scripts/app_command.lua b/scripts/app_command.lua index 50c3b30a4..a96a8b420 100644 --- a/scripts/app_command.lua +++ b/scripts/app_command.lua @@ -41,6 +41,21 @@ do -- NewSprite assert(s2.colorMode == ColorMode.INDEXED) end +do -- ExportSpriteSheet + local s = Sprite{ fromFile="sprites/2f-index-3x3.aseprite" } + app.command.ExportSpriteSheet { + type="horizontal", + textureFilename="_test_export_spritesheet1.png", + shapePadding=1 + } + local i = Image{ fromFile="_test_export_spritesheet1.png" } + expect_img(i, { + 11,8,11,21,8,11,11, + 11,8,11,21,11,8,11, + 11,8,11,21,11,11,8, + }) +end + do -- NewLayer/RemoveLayer local s = Sprite(32, 32) assert(#s.layers == 1) diff --git a/sprites/2f-index-3x3.aseprite b/sprites/2f-index-3x3.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..55d2ce4101e9a7a2150337e935f059fe78208dc1 GIT binary patch literal 616 zcmcJNF-QVY9Ebm>T{gB9H2J6~w^X8%1R-e2hHx;#p~RBB!6+h%pdo_5#U+Tcp{1>$ zEof+Il;*I8jOxa~Mhjlw-4(br_J6$Z-o4}Q_q}^>*(Xvz^NF9CtN?d-#XWx=_03T{l4;CVC(YqL3czkLnMhf}b$64n+AXmkF%V!$F;0s6Qjjy1~o zB8w@SI3kE0YIq@q5ju{G)>xoGKH(%2OD2J&5fyZjlpp>U3KEd%?AFqniVSjND({iz oP