mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-23 13:20:50 +00:00
Test Image:isEmpty() and Image:isPlain()
This commit is contained in:
parent
7a1cd9dad7
commit
b750a92647
@ -9,6 +9,9 @@ local a = Image(32, 64)
|
||||
assert(a.width == 32)
|
||||
assert(a.height == 64)
|
||||
assert(a.colorMode == ColorMode.RGB) -- RGB by default
|
||||
assert(a:isEmpty())
|
||||
assert(a:isPlain(pc.rgba(0, 0, 0, 0)))
|
||||
assert(a:isPlain(0))
|
||||
|
||||
do
|
||||
local b = Image(32, 64, ColorMode.INDEXED)
|
||||
@ -24,6 +27,7 @@ do
|
||||
a:putPixel(x, y, pc.rgba(x, y, x+y, x-y))
|
||||
end
|
||||
end
|
||||
assert(not a:isEmpty())
|
||||
end
|
||||
|
||||
-- Clone
|
||||
|
Loading…
x
Reference in New Issue
Block a user