0
저는 현재 파이썬의 Tkinter 모듈과 클래스를 어지럽히고 있습니다. 캔버스에서 create_oval을 사용할 때 fill = [color]를 사용하는 것이 원의 작은 점 만 채울 때 문제가 발생합니다. 내 코드는 다음과 같습니다.타원형이 완전히 채워지지 않습니다.
import Tkinter as tk
class MainApplication(tk.Frame):
def __init__(self, parent):
tk.Frame.__init__(self, parent)
self.parent = parent
self.canvas(parent)
self.draw_oval()
def canvas(self, parent):
self.canvas = tk.Canvas(parent, width=960, height=600)
self.canvas.pack()
def draw_oval(self):
self.canvas.create_oval(300, 300, 300, 300, width=200, fill='green')
if __name__ == '__main__':
root = tk.Tk()
MainApplication(root).pack()
root.mainloop()
확실하지 않은 문제 임. 모든 비판은 환영합니다, 감사합니다!
아, 내가 볼 : 당신이 200 픽셀 폭/긴 타원형을 원하는 경우
, 당신은 좌표가 아닌 폭이 있음을 제어! 고맙습니다! –