question: parameters for create_polygon() method
SeeBelow at SeeBelow.Nut
SeeBelow at SeeBelow.Nut
Wed May 5 23:20:35 EDT 2004
More information about the Python-list mailing list
Wed May 5 23:20:35 EDT 2004
- Previous message (by thread): question: parameters for create_polygon() method
- Next message (by thread): question: parameters for create_polygon() method
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Peter Otten wrote: <snip> > I just tried it - it may not be in the docs, but it does work. > For example > > import Tkinter as tk > root = tk.Tk() > canvas = tk.Canvas(root) > canvas.pack() > points = [(20, 20), (50, 150), (200, 50)] > > canvas.create_polygon(fill="blue", *points) > root.mainloop() > > will draw a blue triangle. Surprisingly, it works! I tested it also. It never occurred to me to simply try the list of tuples in place of the normal arguments as explained in the docs. I just assumed that the docs were the full story. Yours is the best suggestion. The suggestion about a flatten() function is also a good one, but it turns out not to be needed. Mitchell Timin -- "Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal." - Friedrich Nietzsche http://annevolve.sourceforge.net is what I'm into nowadays. Humans may write to me at this address: zenguy at shaw dot ca
- Previous message (by thread): question: parameters for create_polygon() method
- Next message (by thread): question: parameters for create_polygon() method
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list