diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-07-28 12:47:10 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-07-28 12:47:10 -0600 |
commit | 275c2542c4e414ffe01558cfca2445dcad6bbd29 (patch) | |
tree | 62ef619a9e9577386f7805f7799784a2c03dcb0c /libdimension-python/dimension.pyx | |
parent | 2c6692e1fb0687ddd2898220286c7a3c7e8b6850 (diff) | |
download | dimension-275c2542c4e414ffe01558cfca2445dcad6bbd29.tar.xz |
Remove color_maps.
Diffstat (limited to 'libdimension-python/dimension.pyx')
-rw-r--r-- | libdimension-python/dimension.pyx | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/libdimension-python/dimension.pyx b/libdimension-python/dimension.pyx index dd91b0e..2cde396 100644 --- a/libdimension-python/dimension.pyx +++ b/libdimension-python/dimension.pyx @@ -617,39 +617,6 @@ cdef _Pigment(dmnsn_pigment *pigment): DMNSN_INCREF(self._pigment) return self -cdef class ColorMap(Pigment): - """A color map""" - def __init__(self, Pattern pattern not None, map, bool sRGB not None = True, - *args, **kwargs): - """ - Create a ColorMap. - - Keyword arguments: - pattern -- the pattern to use for the mapping - map -- a dictionary of the form { val1: color1, val2: color2, ... }, - or a list of the form [color1, color2, ...] - sRGB -- whether the gradients should be in sRGB or linear space - (default True) - """ - cdef dmnsn_map *color_map = dmnsn_new_color_map() - if hasattr(map, "items"): - for i, color in map.items(): - dmnsn_add_map_entry(color_map, i, &Color(color)._c) - else: - for i, color in enumerate(map): - dmnsn_add_map_entry(color_map, i/len(map), &Color(color)._c) - - cdef dmnsn_pigment_map_flags flags - if sRGB: - flags = DMNSN_PIGMENT_MAP_SRGB - else: - flags = DMNSN_PIGMENT_MAP_REGULAR - - DMNSN_INCREF(pattern._pattern) - self._pigment = dmnsn_new_color_map_pigment(pattern._pattern, color_map, - flags) - Pigment.__init__(self, *args, **kwargs) - cdef class PigmentMap(Pigment): """A pigment map.""" def __init__(self, Pattern pattern not None, map, bool sRGB not None = True, |