KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The lines drawn on a Tkinter.Canvas are not smooth. How can they be made smooth? Here's what I tried: 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() Here's what it looks like:
Tags (comma-separated)
Save Edits
Cancel