Add app.command.CanvasSize

This commit is contained in:
David Capello 2019-01-06 19:01:59 -03:00
parent 4b331f781a
commit 4d735ed757

View File

@ -106,3 +106,12 @@ do -- PaletteSize
app.command.PaletteSize{ size=8 }
assert(#s.palettes[1] == 8)
end
do -- CanvasSize
local s = Sprite(32, 32)
assert(s.bounds == Rectangle(0, 0, 32, 32))
app.command.CanvasSize{ left=2 }
assert(s.bounds == Rectangle(0, 0, 34, 32))
app.command.CanvasSize{ top=2, right=4, bottom=8 }
assert(s.bounds == Rectangle(0, 0, 38, 42))
end