mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-09 18:44:46 +00:00
Test transparent/background layer in special indexed case for alpha compositing ink
This commit is contained in:
parent
76c2fff045
commit
b81c615211
@ -92,16 +92,23 @@ function test_alpha_compositing_on_indexed_with_full_opacity_and_repeated_colors
|
|||||||
p:setColor(4, Color(255, 255, 255))
|
p:setColor(4, Color(255, 255, 255))
|
||||||
s:setPalette(p)
|
s:setPalette(p)
|
||||||
|
|
||||||
app.command.BackgroundFromLayer()
|
|
||||||
|
|
||||||
local inks = { Ink.SIMPLE, Ink.ALPHA_COMPOSITING }
|
local inks = { Ink.SIMPLE, Ink.ALPHA_COMPOSITING }
|
||||||
for i = 1,2 do
|
|
||||||
for c = 0,4 do
|
-- k=1 -> transparent layer
|
||||||
expect_img(app.activeImage, { 0 })
|
-- k=2 -> background layer
|
||||||
app.useTool{ tool="pencil", color=c, points={ Point(0, 0) },
|
for k=1,2 do
|
||||||
ink=inks[i], opacity=255 }
|
if k == 2 then app.command.BackgroundFromLayer() end
|
||||||
expect_img(app.activeImage, { c })
|
-- i=1 -> simple ink
|
||||||
app.undo()
|
-- i=2 -> alpha compositing ink
|
||||||
|
for i = 1,2 do
|
||||||
|
-- j=color index
|
||||||
|
for j = 0,4 do
|
||||||
|
expect_img(app.activeImage, { 0 })
|
||||||
|
app.useTool{ tool="pencil", color=j, points={ Point(0, 0) },
|
||||||
|
ink=inks[i], opacity=255 }
|
||||||
|
expect_img(app.activeImage, { j })
|
||||||
|
app.undo()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user