question: parameters for create_polygon() method

SeeBelow at SeeBelow.Nut SeeBelow at SeeBelow.Nut
Tue May 4 22:11:28 EDT 2004


Tkinter's canvas object has the method create_polygon().

The docs say the parameters should be like:
(x1, y1, x2, y2, x3, y3, .....)

But it's often much better programming practice to have a list of
tuples, each point being a tuple, like this:
[(x1, y1), (x2, y2), (x3, y3),......]

Is there a good way to manipulate my polygons in the latter form, but
still use create_polygon() to draw them?

Thanks,

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



More information about the Python-list mailing list