Add this parameter "smooth=True"
canvas.create_line(x1, y1, x2, y2, smooth=True)
0 Answer
Add this parameter "smooth=True"
canvas.create_line(x1, y1, x2, y2, smooth=True)
Canvas smooth property can be used to anti-aliasing as follows:
# 创建 Canvas 对象
canvas = tkinter.Canvas(root, width=400, height=400, bg='white')
# 设置 smooth 属性为 True
canvas.config(smooth=True)
# 绘制图形
canvas.create_oval(10, 10, 390, 390, outline='red', width=2)
这家伙很懒,什么都没留下...