Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-10-20 21:57:32 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-10-20 21:57:32 (GMT)
commit3833bf4ab91b651ed2c6f13285ce01f1a1c4b0e3 (patch)
treee2cd160385505739f79990cec39f6564d6311fcb
parent1502001edf8124d6fb3513d302195b5e5c2b0d79 (diff)
fix problem with fill share
-rw-r--r--TurtleArt/tacollaboration.py12
-rw-r--r--TurtleArt/taturtle.py8
2 files changed, 11 insertions, 9 deletions
diff --git a/TurtleArt/tacollaboration.py b/TurtleArt/tacollaboration.py
index 7021e9a..d0a41a3 100644
--- a/TurtleArt/tacollaboration.py
+++ b/TurtleArt/tacollaboration.py
@@ -401,14 +401,12 @@ class Collaboration():
[nick, poly_points] = data_from_string(payload)
shared_poly_points = []
for i in range(len(poly_points)):
- if poly_points[i][0] == 'move':
- shared_poly_points.append(
- (self._tw.turtles.turtle_to_screen_coordinates
- (poly_points[i][1], poly_points[i][2])))
+ x, y = self._turtles.screen_to_turtle_coordinates(
+ (poly_points[i][1], poly_points[i][2]))
+ if poly_points[i][0] in ['move', 'line']:
+ shared_poly_points.append((poly_points[i][0], x, y))
elif poly_points[i][0] in ['rarc', 'larc']:
- shared_poly_points.append(
- (self._tw.turtles.turtle_to_screen_coordinates
- (poly_points[i][1], poly_points[i][2]),
+ shared_poly_points.append((poly_points[i][0], x, y,
poly_points[i][3], poly_points[i][4],
poly_points[i][5]))
if nick != self._tw.nick:
diff --git a/TurtleArt/taturtle.py b/TurtleArt/taturtle.py
index b87d0a6..ac72bdb 100644
--- a/TurtleArt/taturtle.py
+++ b/TurtleArt/taturtle.py
@@ -495,8 +495,12 @@ class Turtle:
if self._turtles.turtle_window.sharing() and share:
shared_poly_points = []
for p in self._poly_points:
- shared_poly_points.append(
- (self._turtles.screen_to_turtle_coordinates(p)))
+ x, y = self._turtles.turtle_to_screen_coordinates(
+ (p[1], p[2]))
+ if p[0] in ['move', 'line']:
+ shared_poly_points.append((p[0], x, y))
+ elif p[0] in ['rarc', 'larc']:
+ shared_poly_points.append((p[0], x, y, p[3], p[4], p[5]))
event = 'F|%s' % (data_to_string(
[self._turtles.turtle_window.nick,
shared_poly_points]))