Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-05-11 08:59:43 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-05-11 08:59:43 (GMT)
commit8423dc6320fbede18007378b7f709882bc9b1a71 (patch)
treedfec19b2367e5bf9e8a2f4b521d2b2151d7d92d4 /TurtleArt
parent7b4eb8c8692d536a3b972e4cfbd87704bd179583 (diff)
fixed problem with turlte move due to consolidation of SVG code; fixed inconsistancy between rendering text with pen up in SVG code
Diffstat (limited to 'TurtleArt')
-rw-r--r--TurtleArt/tacanvas.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/TurtleArt/tacanvas.py b/TurtleArt/tacanvas.py
index 601287c..76220dc 100644
--- a/TurtleArt/tacanvas.py
+++ b/TurtleArt/tacanvas.py
@@ -137,7 +137,7 @@ class TurtleGraphics:
self.bgrgb = [255, 248, 222]
self.bgcolor = self.cm.alloc_color('#fff8de')
self.textsize = 48 # deprecated
- self.textcolor = self.cm.alloc_color('red')
+ self.textcolor = self.cm.alloc_color('red') # deprecated
self.tw.active_turtle.show()
self.shade = 0
self.pendown = False
@@ -182,6 +182,7 @@ class TurtleGraphics:
miny - self.pensize * self.tw.coord_scale / 2 - 3,
w + self.pensize * self.tw.coord_scale + 6,
h + self.pensize * self.tw.coord_scale + 6)
+ # TODO: Add SVG output
def clearscreen(self, share=True):
"""Clear the canvas and reset most graphics attributes to defaults."""
@@ -227,6 +228,7 @@ class TurtleGraphics:
return
if self.pendown:
self.draw_line(oldx, oldy, self.xcor, self.ycor)
+ self.move_turtle()
if self.tw.sharing() and share:
event = "f|%s" % (data_to_string([self._get_my_nick(), int(n)]))
@@ -363,6 +365,7 @@ class TurtleGraphics:
if self.pendown and pendown:
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(),
@@ -573,8 +576,8 @@ class TurtleGraphics:
context.move_to(x, y + h)
context.show_text(message)
- if self.tw.saving_svg and self.pendown:
- self.tw.svg_string += self.svg.text(x - self.width / 2,
+ if self.tw.saving_svg: # and self.pendown:
+ self.tw.svg_string += self.svg.text(x, # - self.width / 2,
y + size, size, w, label)
if self.tw.sharing() and share:
event = "W|%s" % (data_to_string([self._get_my_nick(),
@@ -619,7 +622,6 @@ 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)