hecker0508 Asked:2024-11-15 21:45:24 +0000 UTC2024-11-15 21:45:24 +0000 UTC 2024-11-15 21:45:24 +0000 UTC 枕头上的进度条 772 在我的 TK 中,值得制作一个进度条: 底线:进度条应该围绕用户的头像运行,并且开始和结束值不应该明显地从直角开始,而是从关卡的左侧(头像下方的数字)开始并从水平面的右侧。如果有关于如何在pillow库中实现此功能的方法,请告诉我它是如何实现的。 python 1 个回答 Voted Best Answer hecker0508 2024-11-15T22:57:42Z2024-11-15T22:57:42Z Pillow中有一个函数.arc()只是画一个圆弧: from PIL import Image, ImageDraw img = Image.new("RGBA", (300, 300), "#cccccc" draw = ImageDraw.Draw(img) draw.arc((50, 50, 250, 250), start = 100, end = 80, fill = "#2f3136", width = 5) img.save("arc.png") 对于角度start和end: 0 度 - 东(右) 90 度 - 南(下) 180 度 - 西(左) 270 度 - 北(上)
Pillow中有一个函数
.arc()只是画一个圆弧:对于角度
start和end: