mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 18:00:26 +00:00
Use the new Color.rgbaPixel property
This commit is contained in:
parent
aa4b9d91f3
commit
d16f42e1c9
@ -26,6 +26,9 @@ assert(a.green == 100)
|
||||
assert(a.blue == 20)
|
||||
assert(a.alpha == 200)
|
||||
assert(a == b)
|
||||
print(a.rgbaPixel)
|
||||
print(app.pixelColor.rgba(200, 100, 20, 200))
|
||||
assert(a.rgbaPixel == app.pixelColor.rgba(200, 100, 20, 200))
|
||||
|
||||
a = Color{ h=180, s=0.4, v=0.5, a=200 }
|
||||
b = Color{ hue=180, saturation=0.4, value=0.5, alpha=200 }
|
||||
|
@ -60,7 +60,7 @@ app.useTool{
|
||||
local cel = spr.cels[1]
|
||||
assert(cel.bounds == Rectangle(0, 0, 4, 4))
|
||||
do
|
||||
local r = app.pixelColor.rgba(red.red, red.green, red.blue)
|
||||
local r = red.rgbaPixel
|
||||
local expected = { r, 0, 0, 0,
|
||||
0, r, 0, 0,
|
||||
0, 0, r, 0,
|
||||
@ -85,7 +85,7 @@ app.useTool{
|
||||
points={ Point(3, 0) }}
|
||||
local cel = spr.cels[1]
|
||||
do
|
||||
local r = app.pixelColor.rgba(red.red, red.green, red.blue)
|
||||
local r = red.rgbaPixel
|
||||
local expected = { r, r, r, r,
|
||||
0, r, r, r,
|
||||
0, 0, r, r,
|
||||
@ -111,8 +111,8 @@ app.useTool{
|
||||
points={ Point(0, 0), Point(3, 3) }}
|
||||
local cel = spr.cels[1]
|
||||
do
|
||||
local r = app.pixelColor.rgba(red.red, red.green, red.blue)
|
||||
local b = app.pixelColor.rgba(blue.red, blue.green, blue.blue)
|
||||
local r = red.rgbaPixel
|
||||
local b = blue.rgbaPixel
|
||||
local expected = { b, b, b, b,
|
||||
b, r, r, b,
|
||||
b, 0, r, b,
|
||||
@ -138,9 +138,9 @@ app.useTool{
|
||||
points={ Point(0, 0), Point(3, 3) }}
|
||||
local cel = spr.cels[1]
|
||||
do
|
||||
local r = app.pixelColor.rgba(red.red, red.green, red.blue)
|
||||
local b = app.pixelColor.rgba(blue.red, blue.green, blue.blue)
|
||||
local y = app.pixelColor.rgba(yellow.red, yellow.green, yellow.blue)
|
||||
local r = red.rgbaPixel
|
||||
local b = blue.rgbaPixel
|
||||
local y = yellow.rgbaPixel
|
||||
local expected = { b, y, y, b,
|
||||
y, r, r, y,
|
||||
y, 0, r, y,
|
||||
|
Loading…
Reference in New Issue
Block a user