在 a 上绘制的线条Tkinter.Canvas
并不平滑。如何使它们变得光滑?
这是我尝试过的:
from Tkinter import *
root = Tk()
cv = Canvas(root,bg = 'white')
rt1 = cv.create_rectangle(10,10,110,110,width = 8,tags = ('r1','r2','r3'))
def printRect(event):
print 'rectangle'
def printLine(event):
print 'line'
cv.tag_bind('r1','<Button-1>',printRect)
cv.tag_bind('r1','<Button-3>',printLine)
cv.create_line(10,20,200,200,width = 5,tags = 'r1')
cv.pack()
root.mainloop()
这是它的样子: