mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-15 19:52:05 +00:00
Add Sprite:flatten()
This commit is contained in:
parent
de9f8beed9
commit
ea4f6ce957
@ -62,3 +62,15 @@ do
|
||||
assert(a.palettes[1]:getColor(1) == Color(0, 255, 0))
|
||||
assert(a.palettes[1]:getColor(2) == Color(0, 0, 255))
|
||||
end
|
||||
|
||||
-- Flatten
|
||||
|
||||
do
|
||||
local a = Sprite(32, 32)
|
||||
a:newLayer()
|
||||
a:newLayer()
|
||||
assert(#a.layers == 3)
|
||||
|
||||
a:flatten()
|
||||
assert(#a.layers == 1)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user