- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex64.py
More file actions
Latest commit
14 lines (13 loc) · 365 Bytes
/
Copy pathex64.py
File metadata and controls
14 lines (13 loc) · 365 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'''
利用ellipse 和 rectangle 画图。
(ellipse即为椭圆)
'''
importtkinterastk
canvas=tk.Canvas(width=500, height=500)
canvas.pack()
x0=250
y0=250
foriinrange(10):
canvas.create_oval(x0-200-5*i, y0-100+10*i, x0+200+5*i, y0+100-10*i)
canvas.create_rectangle(x0-200-5*i, y0-100+10*i, x0+200+5*i, y0+100-10*i)
canvas.mainloop()