Turns turtle animation on/off and set delay for update drawings. Optional arguments: n -- nonnegative integer delay -- nonnegative integer If n is given, only each n-th regular screen update is really performed. (Can be used to accelerate the drawin
(self, flag=None, delay=None)
| 2670 | screen._update() |
| 2671 | |
| 2672 | def _tracer(self, flag=None, delay=None): |
| 2673 | """Turns turtle animation on/off and set delay for update drawings. |
| 2674 | |
| 2675 | Optional arguments: |
| 2676 | n -- nonnegative integer |
| 2677 | delay -- nonnegative integer |
| 2678 | |
| 2679 | If n is given, only each n-th regular screen update is really performed. |
| 2680 | (Can be used to accelerate the drawing of complex graphics.) |
| 2681 | Second arguments sets delay value (see RawTurtle.delay()) |
| 2682 | |
| 2683 | Example (for a Turtle instance named turtle): |
| 2684 | >>> turtle.tracer(8, 25) |
| 2685 | >>> dist = 2 |
| 2686 | >>> for i in range(200): |
| 2687 | ... turtle.fd(dist) |
| 2688 | ... turtle.rt(90) |
| 2689 | ... dist += 2 |
| 2690 | """ |
| 2691 | return self.screen.tracer(flag, delay) |
| 2692 | |
| 2693 | def _color(self, args): |
| 2694 | return self.screen._color(args) |