mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 04:19:12 +00:00
Test SaveFile with slice parameter
This commit is contained in:
parent
96c4f703d0
commit
1caeee9ace
@ -5,13 +5,23 @@
|
||||
|
||||
do
|
||||
local spr = Sprite(32, 32)
|
||||
spr.filename = "_test_a.png"
|
||||
app.useTool{ color=Color(255, 255, 255), brush=Brush(1),
|
||||
tool="filled_ellipse", points={{0,0},{31,31}} }
|
||||
spr.filename = "_test_a.aseprite"
|
||||
app.command.SaveFile()
|
||||
assert(spr.filename == "_test_a.png")
|
||||
assert(spr.filename == "_test_a.aseprite")
|
||||
|
||||
app.command.SaveFileAs{ filename="_test_b.png" }
|
||||
assert(spr.filename == "_test_b.png")
|
||||
|
||||
app.command.SaveFileCopyAs{ filename="_test_c.png" }
|
||||
assert(spr.filename == "_test_b.png")
|
||||
|
||||
-- Slices
|
||||
local slice = spr:newSlice(Rectangle(1, 2, 8, 15))
|
||||
slice.name = "small_slice"
|
||||
app.command.SaveFileCopyAs{ filename="_test_c_small_slice.png", slice="small_slice" }
|
||||
local c = app.open("_test_c_small_slice.png")
|
||||
assert(c.width == 8)
|
||||
assert(c.height == 15)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user