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) add_command(get_scroller().resizescrollregion)
def setxy(self, x, y): add_command(self.pen.goto, x, y) add_command(get_canvas().update) add_command(get_scroller().resizescrollregion)
def endfill(self): add_command(self.pen.fill, 0) add_command(get_canvas().update) add_command(get_scroller().resizescrollregion)
def backward(self, v): add_command(self.pen.backward,v) add_command(get_canvas().update) add_command(get_scroller().resizescrollregion)
def clear(self): self.home() add_command(self.pen.clear) add_command(get_canvas().update) add_command(get_scroller().resizescrollregion)
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)
def setx(self, x): add_command(self.pen.setx,x) add_command(get_canvas().update) add_command(get_scroller().resizescrollregion)