Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-02-09 21:05:29 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-02-09 21:05:29 (GMT)
commit3f35b22e3f616e6a9b31b5d49945f8881bb66017 (patch)
treebd1f779f8e6a2447c5571e333a1f9682f679209d
parentc012c6d1129ebcf2626356632e3c45f160d86e2c (diff)
added support for sharing fill; fixed default color definition
-rw-r--r--TurtleArt/tacollaboration.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/TurtleArt/tacollaboration.py b/TurtleArt/tacollaboration.py
index 5141667..e2e7662 100644
--- a/TurtleArt/tacollaboration.py
+++ b/TurtleArt/tacollaboration.py
@@ -80,6 +80,7 @@ class Collaboration():
's' : self._set_pen_shade,
'w' : self._set_pen_width,
'p' : self._set_pen_state,
+ 'F' : self._fill_polygon,
'P' : self._draw_pixbuf
}
@@ -307,6 +308,12 @@ class Collaboration():
self._tw.canvas.set_turtle(nick)
self._tw.canvas.setpen(x, False)
+ def _fill_polygon(self, payload):
+ # Check to make sure that the poly_point array is passed properly
+ if len(payload) > 0:
+ [nick, minx, miny, w, h, poly_points] = data_from_string(payload)
+ self._tw.canvas.fill_polygon(poly_points, minx, miny, w, h)
+
def _get_dictionary(self):
d = {self._get_nick(): self._get_colors()}
return d
@@ -322,7 +329,8 @@ class Collaboration():
else:
colors = self._activity.get_colors()
if colors is None:
- colors = ['#008000', '#00A000']
+ colors = '#008000,#00A000'
+ _logger.debug(colors)
return colors