summaryrefslogtreecommitdiffstats
path: root/libdimension-python/tests
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-12-04 18:43:52 -0500
committerTavian Barnes <tavianator@gmail.com>2011-12-04 19:07:48 -0500
commit176054363582b08aaf93bb4fcc0f26521c0f884c (patch)
tree98833973895f8b9838a1452156ec889f6a0f1dfd /libdimension-python/tests
parent003b3894abe2756541e9aac497058f491961bd17 (diff)
downloaddimension-176054363582b08aaf93bb4fcc0f26521c0f884c.tar.xz
Use a separate class for sRGB colors.
Diffstat (limited to 'libdimension-python/tests')
-rwxr-xr-xlibdimension-python/tests/color.py7
-rwxr-xr-xlibdimension-python/tests/demo.py3
2 files changed, 5 insertions, 5 deletions
diff --git a/libdimension-python/tests/color.py b/libdimension-python/tests/color.py
index 1299a88..9482545 100755
--- a/libdimension-python/tests/color.py
+++ b/libdimension-python/tests/color.py
@@ -26,8 +26,7 @@ die_on_warnings(True)
c = Color(0, 0.5, 1, trans = 0.5, filter = 0.35)
assert repr(c) == "dimension.Color(0.0, 0.5, 1.0, 0.5, 0.35)", repr(c)
-assert str(c) == "<red = 0.0, green = 0.5, blue = 1.0, \
-trans = 0.5, filter = 0.35>", str(c)
+assert str(c) == "Color<0.0, 0.5, 1.0, trans = 0.5, filter = 0.35>", str(c)
assert c.red == 0, c.red
assert c.green == 0.5, c.green
assert c.blue == 1, c.blue
@@ -35,7 +34,7 @@ assert c.trans == 0.5, c.filter
assert c.filter == 0.35, c.trans
c = Color(1, 0.5, 0)
-assert str(c) == "<red = 1.0, green = 0.5, blue = 0.0>", str(c)
+assert str(c) == "Color<1.0, 0.5, 0.0>", str(c)
assert Black == Color(0, 0, 0), Black
assert White == Color(1, 1, 1), White
@@ -44,7 +43,7 @@ assert Red == Color(1, 0, 0), Red
assert Green == Color(0, 1, 0), Green
assert Blue == Color(0, 0, 1), Blue
assert Magenta == Color(1, 0, 1), Magenta
-assert Orange == Color(1, 0.5, 0), Orange
+assert Orange == sRGB(1, 0.5, 0), Orange
assert Yellow == Color(1, 1, 0), Yellow
assert Cyan == Color(0, 1, 1), Cyan
diff --git a/libdimension-python/tests/demo.py b/libdimension-python/tests/demo.py
index 09ae184..d290a7f 100755
--- a/libdimension-python/tests/demo.py
+++ b/libdimension-python/tests/demo.py
@@ -49,7 +49,8 @@ scene = Scene(canvas = canvas,
objects = objects,
lights = lights,
camera = camera)
-scene.default_texture = Texture(finish = Ambient(0.1) + Diffuse(0.7))
+scene.default_texture = Texture(finish = Ambient(sRGB(0.1))
+ + Diffuse(sRGB(0.7)))
scene.background = background
scene.adc_bailout = 1/255
scene.recursion_limit = 5