From 35ba140e863bc516a2cda09df5ccd3782f2d3f3b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 7 Nov 2011 15:23:46 -0500 Subject: Get rid of dmnsn_color_is_black(). --- libdimension-python/tests/color.py | 3 --- libdimension-python/wrapper.pxd | 2 -- libdimension-python/wrapper.pyx | 4 ---- 3 files changed, 9 deletions(-) (limited to 'libdimension-python') 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): -- cgit v1.2.3