python (3.12.0)
̑e ` d Z ddl ddZddZd Zedk( r e Z ee e yy) ap turtle-example-suite:
tdemo_paint.py
A simple event-driven paint program
- left mouse button moves turtle
- middle mouse button changes color
- right mouse button toggles between pen up
(no line drawn when the turtle moves) and
pen down (line is drawn). If pen up follows
at least two pen-down moves, the polygon that
includes the starting point is filled.
-------------------------------------------
Play around by clicking into the canvas
using all three mouse buttons.
-------------------------------------------
To exit press STOP button
-------------------------------------------
)*c p t d rt t y t t y )Npendown)penend_fillupdown
begin_fillxys D/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/turtledemo/paint.pyswitchupdownr s
uY
c N t dd t d d z a t t d y )N r )colorscolorr s r changecolorr s$
ABZr
"F &)r c t d t d t d t d g dat t d t
t t d t t d t t d y )
Ncircleuserg ? )redgreenblueyellowr r EVENTLOOP)
shape
resizemode shapesizewidthr r r
onscreenclickgotor r r mainr'