Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # GrowingCircle.py
- from Tkinter import *
- w=640
- h=640
- root = Tk()
- canvas = Canvas(root, width=w, height=h, bg="black")
- canvas.grid()
- root.wm_title("Growing Circle")
- def _create_circle(self, x, y, r, **kwargs):
- return self.create_oval(x-r, y-r, x+r, y+r, **kwargs)
- Canvas.create_circle = _create_circle
- while 1:
- for z in range(5,320):
- canvas.create_circle(w/2, h/2, z, fill="black", outline="white", width=2)
- canvas.update()
- canvas.create_circle(w/2, h/2, z, fill="black", outline="black", width=2)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement