diff options
author | Walter Bender <walter@walter-laptop.(none)> | 2010-03-01 02:53:16 (GMT) |
---|---|---|
committer | Walter Bender <walter@walter-laptop.(none)> | 2010-03-01 02:53:16 (GMT) |
commit | d202fbe02a8e0cdfff59745ee401ff536b8ccf27 (patch) | |
tree | 1b4db95dc379ad856ab7641fe48324b6d9ebb5d8 /tacanvas.py | |
parent | 2e12bbb464c5fd874f661bae1006fe1c1a47e62d (diff) |
save SVG looks at pendown status
Diffstat (limited to 'tacanvas.py')
-rw-r--r-- | tacanvas.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tacanvas.py b/tacanvas.py index b67a9b5..3266207 100644 --- a/tacanvas.py +++ b/tacanvas.py @@ -119,7 +119,7 @@ class TurtleGraphics: if self.pendown: self.draw_line(oldx, oldy, self.xcor, self.ycor) self.move_turtle() - if self.tw.saving_svg: + if self.tw.saving_svg and self.pendown: self.tw.svg_string += self.svg.new_path(oldx, self.height/2-oldy) self.tw.svg_string += self.svg.line_to(self.xcor, self.height/2-self.ycor) @@ -173,7 +173,7 @@ class TurtleGraphics: self.right(a) self.xcor=cx-r*cos(self.heading*DEGTOR) self.ycor=cy+r*sin(self.heading*DEGTOR) - if self.tw.saving_svg: + if self.tw.saving_svg and self.pendown: self.tw.svg_string += self.svg.new_path(oldx, self.height/2-oldy) self.tw.svg_string += self.svg.arc_to(self.xcor, self.height/2-self.ycor, r, a, @@ -199,7 +199,7 @@ class TurtleGraphics: self.right(-a) self.xcor=cx+r*cos(self.heading*DEGTOR) self.ycor=cy-r*sin(self.heading*DEGTOR) - if self.tw.saving_svg: + if self.tw.saving_svg and self.pendown: self.tw.svg_string += self.svg.new_path(oldx, self.height/2-oldy) self.tw.svg_string += self.svg.arc_to(self.xcor, self.height/2-self.ycor, r, a, @@ -319,7 +319,7 @@ class TurtleGraphics: self.canvas.images[0].draw_layout(self.gc,int(x),int(y),pl) w,h = pl.get_pixel_size() self.invalt(x,y,w,h) - if self.tw.saving_svg: + if self.tw.saving_svg and self.pendown: self.tw.svg_string += self.svg.text(x-self.width/2, y, size, label) |