0
Follow
2
View

Question about #python# : How do I make drawn graphics anti-aliased when drawing with Python's tkinter Canvas

dw0620 注册会员
2023-01-25 00:04

Add this parameter "smooth=True"


canvas.create_line(x1, y1, x2, y2, smooth=True)
cwhjh_1 注册会员
2023-01-25 00:04

Draw a circle on windows if anti-aliased? create_oval

cupidfang8 注册会员
2023-01-25 00:04

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)

About the Author

Question Info

Publish Time
2023-01-25 00:04
Update Time
2023-01-25 00:04

Related Question

移除Python后,如何远程登录ubuntu服务器?

aws connect search_available_phone_numbers API for python不工作

使用python CDK向API网关添加属性

如何添加一个类到python社会认证库?

Python web服务器是如何工作的

想从事python工作,需要把所有的知识都学了吗?

python 用正则表达式获取字符串中的日期

Python爬虫保存csv文件

删除python字典值中的空白,而不转换为字符串?(复制)

Python字符串做形参