class Turtle
Base class:
Object Inherited classes: Empty
Description: represents a turtle in a graphic window
- Fields:
- direction: Direction of the turtle
- pen_color: Pen color of the turtle
- Methods:
- back|bk(): Advances the turtle backward to the specified distance
- clear|cs(): Clears all turtle lines
- ellipse(): Draws an ellipse: the ellipse will be drawn inside the bounding rectangle defined by the current turtle point, as an upper-left point, and the given point parameter as the bottom-right point
- forward|fd(): Advances the turtle forward to the specified distance
- hide_turtle|ht(): Hides the turtle
- left(): Turns the turtle left with the specified angle. If no parameter is given, turns the turtle 90 degrees left.
- pen_down|pd(): Puts the pen down - the turtle movement now draws lines
- pen_erase|pe(): Changes pen move to erase - the turtle movement now deletes lines and points which are on its path
- pen_normal|pn(): Sets the pen mode to normal (no erasing)
- pen_up|pu(): Sets the pen in "Up" mode - turtle movements will not draw lines
- position|pos(): Sets/Gets the turtle position
- redo(): Redoes the last draw operation that was undo
- reset(): Resets the pen state and the turtle state: the turtles set at point (0,0) facing north, and the pen state is down (writing)
- show_turtle|st(): Shows the turtle
- null(): Puts the turtle at point (0,0) facing north
- null(): Turns the turtle right with the specified angle. If no parameter is given, turns the turtle 90 degrees right.
- null(): Draws a line to given point
- null(): Undoes the last draw operation
- Events:
- Empty
Back to Mama reference