summaryrefslogtreecommitdiffstats
path: root/libdimension-python
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension-python')
-rwxr-xr-xlibdimension-python/tests/color.py3
-rw-r--r--libdimension-python/wrapper.pxd2
-rw-r--r--libdimension-python/wrapper.pyx4
3 files changed, 0 insertions, 9 deletions
diff --git a/libdimension-python/tests/color.py b/libdimension-python/tests/color.py
index 88e0b42..47ac975 100755
--- a/libdimension-python/tests/color.py
+++ b/libdimension-python/tests/color.py
@@ -48,8 +48,5 @@ assert Orange == Color(1, 0.5, 0), Orange
assert Yellow == Color(1, 1, 0), Yellow
assert Cyan == Color(0, 1, 1), Cyan
-assert White, bool(White)
-assert not Black, not Black
-
assert Red + Blue == Magenta, Red + Blue
assert 0.5*White == Color(0.5, 0.5, 0.5), 0.5*White
diff --git a/libdimension-python/wrapper.pxd b/libdimension-python/wrapper.pxd
index 2526022..920f6f2 100644
--- a/libdimension-python/wrapper.pxd
+++ b/libdimension-python/wrapper.pxd
@@ -162,8 +162,6 @@ cdef extern from "../libdimension/dimension.h":
dmnsn_color dmnsn_color_add(dmnsn_color color1, dmnsn_color color2)
dmnsn_color dmnsn_color_mul(double n, dmnsn_color color)
- bint dmnsn_color_is_black(dmnsn_color color)
-
dmnsn_color dmnsn_black
dmnsn_color dmnsn_white
dmnsn_color dmnsn_clear
diff --git a/libdimension-python/wrapper.pyx b/libdimension-python/wrapper.pyx
index 5f2b755..5431e75 100644
--- a/libdimension-python/wrapper.pyx
+++ b/libdimension-python/wrapper.pyx
@@ -458,10 +458,6 @@ cdef class Color:
def __get__(self):
return self._sRGB.filter
- def __nonzero__(self):
- """Return whether a color is not black."""
- return not dmnsn_color_is_black(self._c)
-
def __add__(lhs, rhs):
return _sRGBColor(dmnsn_color_add(Color(lhs)._sRGB, Color(rhs)._sRGB))
def __mul__(lhs, rhs):