[Patches] [ python-Patches-595111 ] turtle tracer bugfixes and new functions

noreply@sourceforge.net noreply@sourceforge.net
Fri, 23 Aug 2002 11:23:11 -0700


Patches item #595111, was opened at 2002-08-14 12:24
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=595111&group_id=5470

Category: Tkinter
Group: Python 2.2.x
Status: Open
Resolution: None
>Priority: 3
Submitted By: Attila Babo (ababo)
Assigned to: Guido van Rossum (gvanrossum)
Summary: turtle tracer bugfixes and new functions

Initial Comment:
Environment:
Python 2.2.1 on Windows

Bug fixes:
There is no output without tracing, i.e. with tracer(0)
the module not update the canvas. Fixed in _draw_turtle
and circle. Now after tracer(0) the head turns off
immediatly, all drawing functions working as required
without tracer mode. A few duplicates elimineted in
_goto to clean up the code. Cosmetic changes with
adding and removing empty lines.

New functions:
heading(): returns the current heading of the pen
setheading(angle): sets the heading of the pen
position(): returns the current position, later you can
reuse it with goto()
window_width(): returns the width of the window in pixels
window_height(): returns the height of the window in pixels
setx(xpos): moves the pen such that its y-position
remains the same but its x-position is the given value.
The heading of the pen is not changed. If the pen is
currently down,it will draw a line along its path.
sety(ypos): moves the pen such that its x-position
remains the same but its y-position is the given value.
The heading of the pen is not changed. If the pen is
currently down, it will draw a line along its path.

With these changes the turtle module maintains better
funcionality with Logo turtle graphics.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-08-20 16:40

Message:
Logged In: YES 
user_id=6380

It's a feature that when tracing is off you don't see
anything drawn -- updating the screen after each line is
drawn is too expensive. If you really want this, please make
it a separate flag.

Regarding the new methods added: can you explain why you
need these?

Finally, please submit a documentation patch. If you don't
know LaTeX, try to emulate what's there in
Doc/lib/libturtle.tex, and we'll fix it for you, but we
won't write the docs for you.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=595111&group_id=5470