(self, xscalefactor, yscalefactor)
| 752 | self.cv.config(scrollregion=(srx1, sry1, srx2, sry2)) |
| 753 | |
| 754 | def _rescale(self, xscalefactor, yscalefactor): |
| 755 | items = self.cv.find_all() |
| 756 | for item in items: |
| 757 | coordinates = list(self.cv.coords(item)) |
| 758 | newcoordlist = [] |
| 759 | while coordinates: |
| 760 | x, y = coordinates[:2] |
| 761 | newcoordlist.append(x * xscalefactor) |
| 762 | newcoordlist.append(y * yscalefactor) |
| 763 | coordinates = coordinates[2:] |
| 764 | self.cv.coords(item, *newcoordlist) |
| 765 | |
| 766 | def _resize(self, canvwidth=None, canvheight=None, bg=None): |
| 767 | """Resize the canvas the turtles are drawing on. Does |
no test coverage detected