from Tkinter import * canvas = Canvas(bg = '#cc2233', width=1000, height=600) canvas.pack(expand=YES, fill=BOTH) canvas.create_oval(100, 100, 500, 500) L = canvas.create_line L (0, 0, 300, 300, fill = '#ffffff', dash=(1, 2)) L (0, 10, 300, 305, fill = '#000000', dash=(1, 2, 3, 4)) L (0, 20, 300, 310, fill = '#ffffff', dash=(1, 2)) x = 5 for i in range(100,200): x = x+5 L ((x)+(i),0,300,300, fill = '#ffffff') x=1 for i in range(100,300): x = x*2 L ((x)+(i),0,600,300, fill = '#aaaa33') x=1 for i in range(300,600): x = x*2 L (0,(x)+(i),600,(x)+(i), fill = '#ffff00') x = 2 for i in range(600,1000): x = x*2 L (0,(x)+(i),600,(x)-(i), fill = '#88ff00') x = 1 for i in range(1,50): x = x+5 L (0,(x)+(i),300,(x)+(i), fill = '#00ff00') x = 1 for i in range(1,100): x = x+2 L ((300)+(x)+(i),300,(300)+(x)+(i),600, fill = '#9900bb') canvas.create_text(50,25,fill = '#fff', text = "hello") mainloop()
Comments are closed.