Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Module « turtle » Python 3.11.3

Classe « RawTurtle »

Informations générales

Héritage

builtins.object
    TNavigator
builtins.object
    TPen
        RawTurtle

Définition

class RawTurtle(TPen, TNavigator):

help(RawTurtle)

Animation part of the RawTurtle.
    Puts RawTurtle upon a TurtleScreen and provides tools for
    its animation.
    

Constructeur(s)

Signature du constructeur Description
__init__(self, canvas=None, shape='classic', undobuffersize=1000, visible=True)

Liste des attributs statiques

Nom de l'attribut Valeur
DEFAULT_ANGLEOFFSET0
DEFAULT_ANGLEORIENT1
DEFAULT_MODEstandard
screens[]
START_ORIENTATION{'standard': (1.00,0.00), 'world': (1.00,0.00), 'logo': (0.00,1.00)}

Liste des opérateurs

Opérateurs hérités de la classe object

__eq__, __ge__, __gt__, __le__, __lt__, __ne__

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
begin_fill(self) Called just before drawing a shape to be filled. [extrait de begin_fill.__doc__]
begin_poly(self) Start recording the vertices of a polygon. [extrait de begin_poly.__doc__]
clear(self) Delete the turtle's drawings from the screen. Do not move turtle. [extrait de clear.__doc__]
clearstamp(self, stampid) Delete stamp with given stampid [extrait de clearstamp.__doc__]
clearstamps(self, n=None) Delete all or first/last n of turtle's stamps. [extrait de clearstamps.__doc__]
clone(self) Create and return a clone of the turtle. [extrait de clone.__doc__]
dot(self, size=None, *color) Draw a dot with diameter size, using color. [extrait de dot.__doc__]
end_fill(self) Fill the shape drawn after the call begin_fill(). [extrait de end_fill.__doc__]
end_poly(self) Stop recording the vertices of a polygon. [extrait de end_poly.__doc__]
filling(self) Return fillstate (True if filling, False else). [extrait de filling.__doc__]
get_poly(self) Return the lastly recorded polygon. [extrait de get_poly.__doc__]
get_shapepoly(self) Return the current shape polygon as tuple of coordinate pairs. [extrait de get_shapepoly.__doc__]
getpen(self) Return the Turtleobject itself. [extrait de getturtle.__doc__]
getscreen(self) Return the TurtleScreen object, the turtle is drawing on. [extrait de getscreen.__doc__]
getturtle(self) Return the Turtleobject itself. [extrait de getturtle.__doc__]
onclick(self, fun, btn=1, add=None) Bind fun to mouse-click event on this turtle on canvas. [extrait de onclick.__doc__]
ondrag(self, fun, btn=1, add=None) Bind fun to mouse-move event on this turtle on canvas. [extrait de ondrag.__doc__]
onrelease(self, fun, btn=1, add=None) Bind fun to mouse-button-release event on this turtle on canvas. [extrait de onrelease.__doc__]
reset(self) Delete the turtle's drawings and restore its default values. [extrait de reset.__doc__]
settiltangle(self, angle) Rotate the turtleshape to point in the specified direction [extrait de settiltangle.__doc__]
setundobuffer(self, size) Set or disable undobuffer. [extrait de setundobuffer.__doc__]
shape(self, name=None) Set turtle shape to shape with given name / return current shapename. [extrait de shape.__doc__]
shapesize(self, stretch_wid=None, stretch_len=None, outline=None) Set/return turtle's stretchfactors/outline. Set resizemode to "user". [extrait de shapesize.__doc__]
shapetransform(self, t11=None, t12=None, t21=None, t22=None) Set or return the current transformation matrix of the turtle shape. [extrait de shapetransform.__doc__]
shearfactor(self, shear=None) Set or return the current shearfactor. [extrait de shearfactor.__doc__]
stamp(self) Stamp a copy of the turtleshape onto the canvas and return its id. [extrait de stamp.__doc__]
tilt(self, angle) Rotate the turtleshape by angle. [extrait de tilt.__doc__]
tiltangle(self, angle=None) Set or return the current tilt-angle. [extrait de tiltangle.__doc__]
turtlesize(self, stretch_wid=None, stretch_len=None, outline=None) Set/return turtle's stretchfactors/outline. Set resizemode to "user". [extrait de shapesize.__doc__]
undo(self) undo (repeatedly) the last turtle action. [extrait de undo.__doc__]
undobufferentries(self) Return count of entries in the undobuffer. [extrait de undobufferentries.__doc__]
write(self, arg, move=False, align='left', font=('Arial', 8, 'normal')) Write text at the current turtle position. [extrait de write.__doc__]

Méthodes héritées de la classe TNavigator

__init_subclass__, __subclasshook__, back, backward, bk, circle, degrees, distance, fd, forward, goto, heading, home, left, lt, pos, position, radians, right, rt, seth, setheading, setpos, setposition, setx, sety, speed, towards, xcor, ycor

Méthodes héritées de la classe TPen

__init_subclass__, __subclasshook__, color, down, fillcolor, hideturtle, ht, isdown, isvisible, pd, pen, pencolor, pendown, pensize, penup, pu, resizemode, showturtle, speed, st, up, width

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __getattribute__, __getstate__, __hash__, __init_subclass__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__