diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-04-07 11:15:35 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-04-07 11:15:45 +0300 |
commit | aa8fbbe58e3d7fc7ec5ec0a3b3d9ae25c915f1f2 (patch) | |
tree | f5a631f02baeb06be1402b0c4fb0cf478c9b3cdc /py/tests | |
parent | 3db1349b163b9d9291db3d0f001664968f5f9943 (diff) |
trans-test.py: fix use of colors
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'py/tests')
-rwxr-xr-x | py/tests/trans-test.py | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/py/tests/trans-test.py b/py/tests/trans-test.py index c2d08c1..a16f254 100755 --- a/py/tests/trans-test.py +++ b/py/tests/trans-test.py @@ -31,18 +31,18 @@ def test_am5_trans_dest(): fbs.append(pykms.DumbFramebuffer(card, w, h, "XR24")) fb = fbs[0] - pykms.draw_rect(fb, 0, 0, fb.width, fb.height, purple) - pykms.draw_rect(fb, 100, 100, 100, 200, green) - pykms.draw_rect(fb, 300, 100, 100, 200, red) - pykms.draw_rect(fb, 500, 100, 100, 200, white) + pykms.draw_rect(fb, 0, 0, fb.width, fb.height, pykms.purple) + pykms.draw_rect(fb, 100, 100, 100, 200, pykms.green) + pykms.draw_rect(fb, 300, 100, 100, 200, pykms.red) + pykms.draw_rect(fb, 500, 100, 100, 200, pykms.white) fb = fbs[1] - pykms.draw_rect(fb, 0, 0, fb.width, fb.height, cyan) - pykms.draw_rect(fb, 250, 100, 200, 200, yellow) + pykms.draw_rect(fb, 0, 0, fb.width, fb.height, pykms.cyan) + pykms.draw_rect(fb, 250, 100, 200, 200, pykms.yellow) crtc.set_props({ "trans-key-mode": 1, - "trans-key": purple.rgb888, + "trans-key": pykms.purple.rgb888, "background": 0, "alpha_blender": 0, }) @@ -71,17 +71,17 @@ def test_am5_trans_src(): fbs.append(pykms.DumbFramebuffer(card, w, h, "XR24")) fb = fbs[0] - pykms.draw_rect(fb, 0, 0, fb.width, fb.height, white) - pykms.draw_rect(fb, 200, 200, 100, 100, red) - pykms.draw_rect(fb, fb.width - 300, 200, 100, 100, green) + pykms.draw_rect(fb, 0, 0, fb.width, fb.height, pykms.white) + pykms.draw_rect(fb, 200, 200, 100, 100, pykms.red) + pykms.draw_rect(fb, fb.width - 300, 200, 100, 100, pykms.green) fb = fbs[1] - pykms.draw_rect(fb, 0, 0, fb.width, fb.height, cyan) - pykms.draw_rect(fb, 100, 100, 500, 500, purple) + pykms.draw_rect(fb, 0, 0, fb.width, fb.height, pykms.cyan) + pykms.draw_rect(fb, 100, 100, 500, 500, pykms.purple) crtc.set_props({ "trans-key-mode": 2, - "trans-key": purple.rgb888, + "trans-key": pykms.purple.rgb888, "background": 0, "alpha_blender": 0, }) @@ -111,20 +111,20 @@ def test_am4_normal_trans_dst(): fbs.append(pykms.DumbFramebuffer(card, w * 2 // 3, h, "XR24")) fb = fbs[0] - pykms.draw_rect(fb, 0, 0, w, h, purple) - pykms.draw_rect(fb, 100, 50, 50, 200, green) - pykms.draw_rect(fb, 200, 50, 50, 200, red) - pykms.draw_rect(fb, 300, 50, 50, 200, white) + pykms.draw_rect(fb, 0, 0, w, h, pykms.purple) + pykms.draw_rect(fb, 100, 50, 50, 200, pykms.green) + pykms.draw_rect(fb, 200, 50, 50, 200, pykms.red) + pykms.draw_rect(fb, 300, 50, 50, 200, pykms.white) fb = fbs[1] - pykms.draw_rect(fb, 0, 0, fb.width, fb.height, blue) + pykms.draw_rect(fb, 0, 0, fb.width, fb.height, pykms.blue) fb = fbs[2] - pykms.draw_rect(fb, 0, 0, fb.width, fb.height, cyan) + pykms.draw_rect(fb, 0, 0, fb.width, fb.height, pykms.cyan) crtc.set_props({ "trans-key-mode": 1, - "trans-key": purple.rgb888, + "trans-key": pykms.purple.rgb888, "background": 0, "alpha_blender": 0, }) @@ -183,20 +183,20 @@ def test_am4_normal_trans_src(): fb = fbs[0] pykms.draw_rect(fb, 0, 0, w, h, pykms.RGB(128, 255, 255)) - pykms.draw_rect(fb, 200, 100, 50, 200, red) - pykms.draw_rect(fb, w - 200 - 50, 100, 50, 200, green) + pykms.draw_rect(fb, 200, 100, 50, 200, pykms.red) + pykms.draw_rect(fb, w - 200 - 50, 100, 50, 200, pykms.green) fb = fbs[1] - pykms.draw_rect(fb, 0, 0, fb.width, fb.height, blue) - pykms.draw_rect(fb, 100, 100, fb.width - 200, fb.height - 200, purple) + pykms.draw_rect(fb, 0, 0, fb.width, fb.height, pykms.blue) + pykms.draw_rect(fb, 100, 100, fb.width - 200, fb.height - 200, pykms.purple) fb = fbs[2] - pykms.draw_rect(fb, 0, 0, fb.width, fb.height, cyan) - pykms.draw_rect(fb, 100, 100, fb.width - 200, fb.height - 200, purple) + pykms.draw_rect(fb, 0, 0, fb.width, fb.height, pykms.cyan) + pykms.draw_rect(fb, 100, 100, fb.width - 200, fb.height - 200, pykms.purple) crtc.set_props({ "trans-key-mode": 2, - "trans-key": purple.rgb888, + "trans-key": pykms.purple.rgb888, "background": 0, "alpha_blender": 0, }) @@ -254,21 +254,21 @@ def test_am4_alpha_trans_src(): fbs.append(pykms.DumbFramebuffer(card, w // 2, h, "XR24")) fb = fbs[0] - pykms.draw_rect(fb, 0, 0, w, h, purple) - pykms.draw_rect(fb, 200, 100, 50, 200, red) - pykms.draw_rect(fb, w - 200 - 50, 100, 50, 200, green) + pykms.draw_rect(fb, 0, 0, w, h, pykms.purple) + pykms.draw_rect(fb, 200, 100, 50, 200, pykms.red) + pykms.draw_rect(fb, w - 200 - 50, 100, 50, 200, pykms.green) fb = fbs[1] - pykms.draw_rect(fb, 0, 0, fb.width, fb.height, blue) - pykms.draw_rect(fb, 100, 100, fb.width - 200, fb.height - 200, purple) + pykms.draw_rect(fb, 0, 0, fb.width, fb.height, pykms.blue) + pykms.draw_rect(fb, 100, 100, fb.width - 200, fb.height - 200, pykms.purple) fb = fbs[2] - pykms.draw_rect(fb, 0, 0, fb.width, fb.height, cyan) - pykms.draw_rect(fb, 100, 100, fb.width - 200, fb.height - 200, purple) + pykms.draw_rect(fb, 0, 0, fb.width, fb.height, pykms.cyan) + pykms.draw_rect(fb, 100, 100, fb.width - 200, fb.height - 200, pykms.purple) crtc.set_props({ "trans-key-mode": 1, - "trans-key": purple.rgb888, + "trans-key": pykms.purple.rgb888, "background": 0, "alpha_blender": 1, }) |