about polygon
Peter Otten
__peter__ at web.de
Sun Nov 20 07:22:35 EST 2005
Shi Mu wrote:
> Why I got a black polygon in the following code?
> How can I make it no-color filled?
> Thanks!
>
> import Tkinter
>
> c = Tkinter.Canvas(width=220, height=220)
> c.pack()
> c.create_polygon(60,60,100,60,100,100,60,120)
> c.mainloop()
You can set the color explicitly (use "" to denote transparency):
c.create_polygon(60,60,100,60,100,100,60,120, fill="", outline="black")
I don't know why that isn't the default.
Peter
More information about the Python-list
mailing list