From 128f72b2d101b942cdb522caca92222f31be9650 Mon Sep 17 00:00:00 2001 From: Pootle daemon Date: Sun, 20 Oct 2013 23:53:10 +0000 Subject: Merge branch 'master' of git.sugarlabs.org:turtleart/mainline --- diff --git a/TurtleArt/tacollaboration.py b/TurtleArt/tacollaboration.py index 4f4406b..d0a41a3 100644 --- a/TurtleArt/tacollaboration.py +++ b/TurtleArt/tacollaboration.py @@ -1,4 +1,4 @@ -#Copyright (c) 2011-12 Walter Bender +#Copyright (c) 2011-13 Walter Bender #Copyright (c) 2011 Collabora Ltd. #Permission is hereby granted, free of charge, to any person obtaining a copy @@ -401,9 +401,14 @@ class Collaboration(): [nick, poly_points] = data_from_string(payload) shared_poly_points = [] for i in range(len(poly_points)): - shared_poly_points.append( - (self._tw.turtles.turtle_to_screen_coordinates - (poly_points[i][0], poly_points[i][1]))) + 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((poly_points[i][0], x, y, + poly_points[i][3], poly_points[i][4], + poly_points[i][5])) if nick != self._tw.nick: self._tw.turtles.set_turtle(nick) self._tw.turtles.get_active_turtle().set_poly_points( 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])) -- cgit v0.9.1