fimg-core.c binding completed

This commit is contained in:
Mutah committed 2021-05-12 19:50:27 +02:00
1 parent e57d63f562
commit eaf039a83f
2 files changed
+37 -26

No files matched your search

+9 -1
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]