Resize the canvas the turtles are drawing on. Does not alter the drawing window.
(self, canvwidth=None, canvheight=None, bg=None)
| 669 | self.cv.coords(item, *newcoordlist) |
| 670 | |
| 671 | def _resize(self, canvwidth=None, canvheight=None, bg=None): |
| 672 | """Resize the canvas the turtles are drawing on. Does |
| 673 | not alter the drawing window. |
| 674 | """ |
| 675 | # needs amendment |
| 676 | if not isinstance(self.cv, ScrolledCanvas): |
| 677 | return self.canvwidth, self.canvheight |
| 678 | if canvwidth is canvheight is bg is None: |
| 679 | return self.cv.canvwidth, self.cv.canvheight |
| 680 | if canvwidth is not None: |
| 681 | self.canvwidth = canvwidth |
| 682 | if canvheight is not None: |
| 683 | self.canvheight = canvheight |
| 684 | self.cv.reset(canvwidth, canvheight, bg) |
| 685 | |
| 686 | def _window_size(self): |
| 687 | """ Return the width and height of the turtle window. |