Test that exporting a sprite sheet uses the correct mask color index when spacing > 0 (test https://github.com/aseprite/aseprite/issues/3391)

This commit is contained in:
Martín Capello 2022-06-27 16:48:29 -03:00
parent 2c601bee77
commit f2312f85fe
3 changed files with 17 additions and 0 deletions

View File

@ -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)

Binary file not shown.

View File

@ -23,3 +23,5 @@
content as in `point4frames.aseprite`. Useful to test if
`"sourceSize"` is different when two cels from different sprites are
merged in the same texture atlas.
* `2f-index-3x3.aseprite`: Indexed, 2 frames, 1 layer, mask color set
to index 21.