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 :

Vous êtes un professionnel et vous avez besoin d'une formation ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Classe « TPen » Python 3.13.2

Méthode turtle.TPen.width

Signature de la méthode width

def width(self, width=None) 

Description

help(TPen.width)

Set or return the line thickness.

Aliases:  pensize | width

Argument:
width -- positive number

Set the line thickness to width or return it. If resizemode is set
to "auto" and turtleshape is a polygon, that polygon is drawn with
the same line thickness. If no argument is given, current pensize
is returned.

Example (for a Turtle instance named turtle):
>>> turtle.pensize()
1
>>> turtle.pensize(10)   # from here on lines of width 10 are drawn


Vous êtes un professionnel et vous avez besoin d'une formation ? Calcul scientifique
avec Python
Voir le programme détaillé