mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-23 22:43:32 +00:00
Test new Sprite{ fromFile="...", oneFrame=true } API
This commit is contained in:
parent
233c56a880
commit
34789673a4
@ -125,3 +125,21 @@ do
|
||||
local s2 = Sprite{ fromFile="_test_sprite_gridbounds.png" }
|
||||
assert(s.gridBounds == Rectangle{2, 3, 8, 4})
|
||||
end
|
||||
|
||||
-- Sprite{ fromFile, oneFrame }
|
||||
do
|
||||
local s = Sprite(32, 32)
|
||||
s:newFrame()
|
||||
s:saveAs("_test1.png")
|
||||
assert(#s.frames == 2)
|
||||
|
||||
s = Sprite{ fromFile="_test1.png" }
|
||||
print(#s.frames)
|
||||
assert(#s.frames == 2)
|
||||
|
||||
s = Sprite{ fromFile="_test1.png", oneFrame=true }
|
||||
assert(#s.frames == 1)
|
||||
|
||||
s = Sprite{ fromFile="_test1.png", oneFrame=false }
|
||||
assert(#s.frames == 2)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user