mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-06 03:39:51 +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(1) == Color(0, 255, 0))
|
||||||
assert(a.palettes[1]:getColor(2) == Color(0, 0, 255))
|
assert(a.palettes[1]:getColor(2) == Color(0, 0, 255))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Flatten
|
||||||
|
|
||||||
|
do
|
||||||
|
local a = Sprite(32, 32)
|
||||||
|
a:newLayer()
|
||||||
|
a:newLayer()
|
||||||
|
assert(#a.layers == 3)
|
||||||
|
|
||||||
|
a:flatten()
|
||||||
|
assert(#a.layers == 1)
|
||||||
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user