fimg-core.c binding completed

This commit is contained in:
2021-05-12 19:50:27 +02:00
parent e57d63f562
commit eaf039a83f
2 changed files with 37 additions and 26 deletions

View File

@@ -54,7 +54,6 @@ def test_rgb_constant():
assert img.get(x, y) == color
def test_copy_data():
width = 5
height = 5
@@ -104,3 +103,12 @@ def test_put_rgb():
assert img.get(0, 0) == [0.0, 0.0, 0.0]
img.put(0, 0, (127.0, 127.0, 127.0))
assert img.get(0, 0) == [127.0, 127.0, 127.0]
def test_add():
width, height = 5, 5
img = floatimg.create_rgb(width, height)
color = (32.0, 32.0, 32.0)
img.put(0, 0, color)
img.add(0, 0, color)
assert img.get(0, 0) == [64.0, 64.0, 64.0]