diff options
author | Marion Zepf <marion.zepf@gmail.com> | 2013-10-27 02:06:05 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2013-10-27 02:06:05 (GMT) |
commit | 629722d8859d1e8db47417673cb78963d41ce435 (patch) | |
tree | d188a0c26c724bc151c3449eb7a5613777f2ed40 /TurtleArt/tacanvas.py | |
parent | 8ac55749fbe9672ea3f403c93713b403efac46af (diff) |
python export
Diffstat (limited to 'TurtleArt/tacanvas.py')
-rw-r--r-- | TurtleArt/tacanvas.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/TurtleArt/tacanvas.py b/TurtleArt/tacanvas.py index 89b8ed1..4bac442 100644 --- a/TurtleArt/tacanvas.py +++ b/TurtleArt/tacanvas.py @@ -1,4 +1,4 @@ -31#Copyright (c) 2007-8, Playful Invention Company. +#Copyright (c) 2007-8, Playful Invention Company. #Copyright (c) 2008-11, Walter Bender #Copyright (c) 2011 Collabora Ltd. <http://www.collabora.co.uk/> @@ -28,7 +28,7 @@ import cairo import pangocairo from tautils import get_path -from taconstants import COLORDICT, TMP_SVG_PATH +from taconstants import Color, TMP_SVG_PATH def wrap100(n): @@ -208,19 +208,19 @@ class TurtleGraphics: save_rgb = self._fgrgb[:] # Special case for color blocks - if color in COLORDICT: - if COLORDICT[color][0] is None: - self._shade = COLORDICT[color][1] + if isinstance(color, Color): + if color.color is None: + self._shade = color.shade else: - self._color = COLORDICT[color][0] + self._color = color.color else: self._color = color - if shade in COLORDICT: - self._shade = COLORDICT[shade][1] + if isinstance(shade, Color): + self._shade = shade.shade else: self._shade = shade - if gray in COLORDICT: - self._gray = COLORDICT[gray][2] + if isinstance(gray, Color): + self._gray = gray.gray else: self._gray = gray |