diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-11-07 15:23:46 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-11-07 15:23:46 -0500 |
commit | 35ba140e863bc516a2cda09df5ccd3782f2d3f3b (patch) | |
tree | 2c1a5a9a00816bd52ad2a7ebc2831b517ccf1b4d /libdimension-python | |
parent | 3e40d9c7b75dec008beb6b4ecf71b60e8bae088d (diff) | |
download | dimension-35ba140e863bc516a2cda09df5ccd3782f2d3f3b.tar.xz |
Get rid of dmnsn_color_is_black().
Diffstat (limited to 'libdimension-python')
-rwxr-xr-x | libdimension-python/tests/color.py | 3 | ||||
-rw-r--r-- | libdimension-python/wrapper.pxd | 2 | ||||
-rw-r--r-- | libdimension-python/wrapper.pyx | 4 |
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): |