コード例 #1
0
ファイル: logo_turtle.py プロジェクト: gldnspud/pylogo
 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)
コード例 #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)
コード例 #3
0
 def setx(self, x):
     t = self.pen
     add_command(t.goto, x, t.position()[1])
     add_command(get_canvas().update)
コード例 #4
0
 def setxy(self, x, y):
     add_command(self.pen.goto, x, y)
     add_command(get_canvas().update)
コード例 #5
0
ファイル: logo_turtle.py プロジェクト: gcross/pylogo
 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)
コード例 #6
0
ファイル: logo_turtle.py プロジェクト: gldnspud/pylogo
 def setxy(self, x, y):
     add_command(self.pen.goto, x, y)
     add_command(get_canvas().update)
コード例 #7
0
ファイル: logo_turtle.py プロジェクト: gldnspud/pylogo
 def forward(self, v):
     add_command(self.pen.forward, v)
     add_command(get_canvas().update)
コード例 #8
0
ファイル: logo_turtle.py プロジェクト: gldnspud/pylogo
 def clear(self):
     self.home()
     add_command(self.pen.clear)
     add_command(get_canvas().update)
コード例 #9
0
 def clear(self):
     self.home()
     add_command(self.pen.clear)
     add_command(get_canvas().update)
コード例 #10
0
 def home(self):
     add_command(self.pen.setheading, 0)
     add_command(self.pen.goto, 0, 0)
     add_command(get_canvas().update)
コード例 #11
0
 def sety(self, y):
     t = self.pen
     add_command(t.goto, t.position()[0], y)
     add_command(get_canvas().update)
コード例 #12
0
ファイル: logo_turtle.py プロジェクト: gcross/pylogo
 def setxy(self, x, y):
     add_command(self.pen.goto, x, y)
     add_command(get_canvas().update)
     add_command(get_scroller().resizescrollregion)
コード例 #13
0
ファイル: logo_turtle.py プロジェクト: gcross/pylogo
 def endfill(self):
     add_command(self.pen.fill, 0)
     add_command(get_canvas().update)
     add_command(get_scroller().resizescrollregion)
コード例 #14
0
ファイル: logo_turtle.py プロジェクト: gcross/pylogo
 def backward(self, v):
     add_command(self.pen.backward,v)
     add_command(get_canvas().update)
     add_command(get_scroller().resizescrollregion)
コード例 #15
0
ファイル: logo_turtle.py プロジェクト: gcross/pylogo
 def clear(self):
     self.home()
     add_command(self.pen.clear)
     add_command(get_canvas().update)
     add_command(get_scroller().resizescrollregion)
コード例 #16
0
ファイル: logo_turtle.py プロジェクト: gldnspud/pylogo
 def sety(self, y):
     t = self.pen
     add_command(t.goto, t.position()[0], y)
     add_command(get_canvas().update)
コード例 #17
0
ファイル: logo_turtle.py プロジェクト: gldnspud/pylogo
 def home(self):
     add_command(self.pen.setheading, 0)
     add_command(self.pen.goto, 0, 0)
     add_command(get_canvas().update)
コード例 #18
0
 def __init__(self):
     self.pen = turtle.RawPen(get_canvas())
     self.pen.degrees()
     self._all_turtles.append(weakref.ref(self))
     self._count = self._turtle_count
     self.__class__._turtle_count += 1
コード例 #19
0
ファイル: logo_turtle.py プロジェクト: gldnspud/pylogo
 def __init__(self):
     self.pen = turtle.RawPen(get_canvas())
     self.pen.degrees()
     self._all_turtles.append(weakref.ref(self))
     self._count = self._turtle_count
     self.__class__._turtle_count += 1
コード例 #20
0
 def forward(self, v):
     add_command(self.pen.forward, v)
     add_command(get_canvas().update)
コード例 #21
0
ファイル: logo_turtle.py プロジェクト: gldnspud/pylogo
 def backward(self, v):
     add_command(self.pen.backward, v).add_command(get_canvas().update)
コード例 #22
0
 def backward(self, v):
     add_command(self.pen.backward, v).add_command(get_canvas().update)
コード例 #23
0
ファイル: logo_turtle.py プロジェクト: gldnspud/pylogo
 def endfill(self):
     add_command(self.pen.fill, 0)
     add_command(get_canvas().update)
コード例 #24
0
 def endfill(self):
     add_command(self.pen.fill, 0)
     add_command(get_canvas().update)
コード例 #25
0
ファイル: logo_turtle.py プロジェクト: gldnspud/pylogo
 def setx(self, x):
     t = self.pen
     add_command(t.goto, x, t.position()[1])
     add_command(get_canvas().update)
コード例 #26
0
ファイル: logo_turtle.py プロジェクト: gcross/pylogo
 def setx(self, x):
     add_command(self.pen.setx,x)
     add_command(get_canvas().update)
     add_command(get_scroller().resizescrollregion)