默认情况下,我在画布上绘制的圆圈为黑色轮廓。我试图不使用颜色,但不知何故使轮廓消失。
import tkinter
class Draw:
def __init__(self):
self._root_window = tkinter.Tk()
self._canvas = tkinter.Canvas(master = self._root_window,
width = 500, height = 500,
background = '#1E824C')
self._canvas.pack()
self._canvas.create_oval(100,100,250,250, fill = 'white')
self._root_window.mainloop
if __name__ == '__main__':
Draw()
答案 0 :(得分:5)
将outline=""
参数添加到create_oval
方法。
然后你可以创建椭圆链接:
self._canvas.create_oval(100,100,250,250, fill = 'white', outline="")
答案 1 :(得分:2)