def create_drawing(scale=1.0): t = PdfTurtle.create(600, 600) t.fillcolor('blue') t.begin_fill() for i in range(20): d = (50 + i*i*1.5) t.pencolor(0, 0.05*i, 0) t.width(i) t.forward(d) t.right(144) t.end_fill() drawing = t.to_reportlab() # Scale the Drawing. drawing.scale(scale, scale) drawing.width *= scale drawing.height *= scale return drawing
def draw(self): t = PdfTurtle(self.canv, self._frame) draw_spiral(t)
def draw(self): t = PdfTurtle(self.canv, self._frame, self.width, self.height) t.up() t.back(self.width/2) t.left(90) t.forward(self.height/2) t.right(90) t.down() draw_diagram(t, self.board_state, self.cell_size)
def draw(self): t = PdfTurtle(self.canv, self._frame, self.width, self.height) t.up() t.back(self.width / 2) t.left(90) t.forward(self.height / 2) t.right(90) t.down() try: draw_diagram(t, self.board_state, self.cell_size) except: print(self.board_state) raise
def draw(self): t = PdfTurtle(self.canv, width=self.width, height=self.height) t.fillcolor('blue') t.begin_fill() for i in range(20): d = (50 + i*i*1.5)*self.scale t.pencolor(0, 0.05*i, 0) t.width(i*self.scale) t.forward(d) t.right(144) t.end_fill()
def draw(self): t = PdfTurtle(self.canv, width=self.width, height=self.height) t.fillcolor('blue') t.begin_fill() for i in range(20): d = (50 + i * i * 1.5) * self.scale t.pencolor(0, 0.05 * i, 0) t.width(i * self.scale) t.forward(d) t.right(144) t.end_fill()