canvas 弧形发帖
本帖最后由 fytfytf 于 2020-7-9 16:24 编辑from tkinter import *
root=Tk()
p=Canvas(root,width=800,height=800,background='white')
p.pack()
p.create_line(0,400,800,400,dash=(4,2))#横坐标线
p.create_line(400,0,400,800,dash=(4,2))#纵坐标线
p.create_oval(250,150,550,450,fill='blue',outline='black')#头
p.create_oval(270,200,530,445,fill='white',outline='black')#脸
p.create_oval(335,175,400,255,fill='white',outline='black')#左眼
p.create_oval(400,175,465,255,fill='white',outline='black')#右眼
p.create_oval(372,205,390,230,fill='black',outline='black')#左眼黑
p.create_oval(410,205,428,230,fill='black',outline='black')#右眼黑
p.create_oval(380,212,385,224,fill='white',outline='black')#左眼白
p.create_oval(415,212,420,224,fill='white',outline='black')#右眼白
p.create_oval(388,238,412,262,fill='red',outline='black')#鼻子
p.create_line(400,262,400,342,fill='black')#鼻子缝
p.create_rectangle(290,400,510,580,fill='blue',outline='black')#身
p.create_line(290,400,510,400,fill='red',width='20',capstyle=ROUND)#脖子
p.create_arc(150,350,500,350,outline='black',style='arc',extent=180.0)#嘴
root.mainloop()
canvas的弧形参数角度怎么设置啊,搞不懂啊,有没有大佬教一下{:10_266:}
参考下这个帖子吧,画嘴巴当时浪费了我好长时间:
https://blog.csdn.net/A757291228/article/details/106739556
页:
[1]