Esempio n. 1
0
 def turtlewrite(self, text, move=False):
     if isinstance(text, list):
         text = ' '.join(map(str, text))
     else:
         text = str(text)
     add_command(self.pen.write, text, move)
     add_command(get_canvas().update)
Esempio n. 2
0
 def turtlewrite(self, text, move=False):
     if isinstance(text, list):
         text = ' '.join(map(str, text))
     else:
         text = str(text)
     add_command(self.pen.write, text, move)
     add_command(get_canvas().update)
Esempio n. 3
0
 def backward(self, v):
     add_command(self.pen.backward, v).add_command(get_canvas().update)
Esempio n. 4
0
 def setheading(self, v):
     add_command(self.pen.setheading, v)
Esempio n. 5
0
 def clear(self):
     self.home()
     add_command(self.pen.clear)
     add_command(get_canvas().update)
Esempio n. 6
0
 def endfill(self):
     add_command(self.pen.fill, 0)
     add_command(get_canvas().update)
Esempio n. 7
0
 def setx(self, x):
     t = self.pen
     add_command(t.goto, x, t.position()[1])
     add_command(get_canvas().update)
Esempio n. 8
0
 def pencolor(self, *args):
     add_command(self.pen.color, *args)
Esempio n. 9
0
 def delay(self, x):
     add_command(self.pen.delay,x)
Esempio n. 10
0
 def setheading(self, v):
     add_command(self.pen.setheading, v)
Esempio n. 11
0
 def home(self):
     add_command(self.pen.setheading, 0)
     add_command(self.pen.goto, 0, 0)
     add_command(get_canvas().update)
Esempio n. 12
0
 def setxy(self, x, y):
     add_command(self.pen.goto, x, y)
     add_command(get_canvas().update)
     add_command(get_scroller().resizescrollregion)
Esempio n. 13
0
 def sety(self, y):
     t = self.pen
     add_command(t.goto, t.position()[0], y)
     add_command(get_canvas().update)
Esempio n. 14
0
 def endfill(self):
     add_command(self.pen.fill, 0)
     add_command(get_canvas().update)
     add_command(get_scroller().resizescrollregion)
Esempio n. 15
0
 def backward(self, v):
     add_command(self.pen.backward,v)
     add_command(get_canvas().update)
     add_command(get_scroller().resizescrollregion)
Esempio n. 16
0
 def clear(self):
     self.home()
     add_command(self.pen.clear)
     add_command(get_canvas().update)
     add_command(get_scroller().resizescrollregion)
Esempio n. 17
0
 def right(self, v):
     add_command(self.pen.right, v)
Esempio n. 18
0
 def clear(self):
     self.home()
     add_command(self.pen.clear)
     add_command(get_canvas().update)
Esempio n. 19
0
 def pendown(self):
     add_command(self.pen.down)
Esempio n. 20
0
 def forward(self, v):
     add_command(self.pen.forward, v)
     add_command(get_canvas().update)
Esempio n. 21
0
 def showturtle(self):
     add_command(self.pen.tracer, 1)
Esempio n. 22
0
 def backward(self, v):
     add_command(self.pen.backward, v).add_command(get_canvas().update)
Esempio n. 23
0
 def home(self):
     add_command(self.pen.setheading, 0)
     add_command(self.pen.goto, 0, 0)
     add_command(get_canvas().update)
     add_command(get_scroller().resizescrollregion)
Esempio n. 24
0
 def left(self, v):
     add_command(self.pen.left, v)
Esempio n. 25
0
 def setxy(self, x, y):
     add_command(self.pen.goto, x, y)
     add_command(get_canvas().update)
Esempio n. 26
0
 def right(self, v):
     add_command(self.pen.right, v)
Esempio n. 27
0
 def sety(self, y):
     t = self.pen
     add_command(t.goto, t.position()[0], y)
     add_command(get_canvas().update)
Esempio n. 28
0
 def penup(self):
     add_command(self.pen.up)
Esempio n. 29
0
 def home(self):
     add_command(self.pen.setheading, 0)
     add_command(self.pen.goto, 0, 0)
     add_command(get_canvas().update)
Esempio n. 30
0
 def pendown(self):
     add_command(self.pen.down)
Esempio n. 31
0
 def forward(self, v):
     add_command(self.pen.forward, v)
     add_command(get_canvas().update)
Esempio n. 32
0
 def penwidth(self, v):
     add_command(self.pen.width, v)
Esempio n. 33
0
 def left(self, v):
     add_command(self.pen.left, v)
Esempio n. 34
0
 def pencolor(self, *args):
     add_command(self.pen.color, *args)
Esempio n. 35
0
 def penup(self):
     add_command(self.pen.up)
Esempio n. 36
0
 def hideturtle(self):
     add_command(self.pen.tracer, 0)
Esempio n. 37
0
 def penwidth(self, v):
     add_command(self.pen.width, v)
Esempio n. 38
0
 def startfill(self):
     add_command(self.pen.fill, 1)
Esempio n. 39
0
 def hideturtle(self):
     add_command(self.pen.tracer, 0)
Esempio n. 40
0
 def setxy(self, x, y):
     add_command(self.pen.goto, x, y)
     add_command(get_canvas().update)
Esempio n. 41
0
 def showturtle(self):
     add_command(self.pen.tracer, 1)
Esempio n. 42
0
 def speed(self, x):
     add_command(self.pen.speed,x)
Esempio n. 43
0
 def endfill(self):
     add_command(self.pen.fill, 0)
     add_command(get_canvas().update)
Esempio n. 44
0
 def startfill(self):
     add_command(self.pen.fill, 1)
Esempio n. 45
0
 def setx(self, x):
     t = self.pen
     add_command(t.goto, x, t.position()[1])
     add_command(get_canvas().update)
Esempio n. 46
0
 def setx(self, x):
     add_command(self.pen.setx,x)
     add_command(get_canvas().update)
     add_command(get_scroller().resizescrollregion)