From 5323f0a2ff52b485b7078c2b2456b685164587d2 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Tue, 10 May 2011 20:47:52 +0000 Subject: fixed problem with save to svg for setxy --- (limited to 'TurtleArt/tacanvas.py') diff --git a/TurtleArt/tacanvas.py b/TurtleArt/tacanvas.py index e437808..a32ad9d 100644 --- a/TurtleArt/tacanvas.py +++ b/TurtleArt/tacanvas.py @@ -229,14 +229,7 @@ class TurtleGraphics: return if self.pendown: self.draw_line(oldx, oldy, self.xcor, self.ycor) - self.move_turtle() - if self.tw.saving_svg and self.pendown: - self.tw.svg_string += self.svg.new_path(oldx, - self.invert_y_coordinate(oldy)) - self.tw.svg_string += self.svg.line_to(self.xcor, - self.invert_y_coordinate(self.ycor)) - self.tw.svg_string += "\"\n" - self.tw.svg_string += self.svg.style() + if self.tw.sharing() and share: event = "f|%s" % (data_to_string([self._get_my_nick(), int(n)])) self.tw.send_event(event) @@ -373,7 +366,6 @@ class TurtleGraphics: self.gc.set_foreground(self.fgcolor) self.draw_line(oldx, oldy, self.xcor, self.ycor) - self.move_turtle() if self.tw.sharing() and share: event = "x|%s" % (data_to_string([self._get_my_nick(), [round_int(x), round_int(y)]])) @@ -639,6 +631,12 @@ class TurtleGraphics: miny - int(self.pensize * self.tw.coord_scale / 2) - 3, w + self.pensize * self.tw.coord_scale + 6, h + self.pensize * self.tw.coord_scale + 6) + self.move_turtle() + if self.tw.saving_svg and self.pendown: + self.tw.svg_string += self.svg.new_path(x1, y1) + self.tw.svg_string += self.svg.line_to(x2, y2) + self.tw.svg_string += "\"\n" + self.tw.svg_string += self.svg.style() def turn_turtle(self): """ Change the orientation of the turtle """ -- cgit v0.9.1