#Ryan Sherwood #CSC110 #Sp'11 #April 25, 2011 #Creating a picture with the GUI # # # Statement for Gui tools import Gui # Named Constants CANVAS_WIDTH = 640 CANVAS_HEIGHT = 480 #def Sun(x, y, z): #canvas.circle ([0,0], 10, fill= yellow) # Functions def main(): canvas.circle ([0,0], 10, fill= 'yellow') ##################################################################### # # DO NOT CHANGE ANYTHING BELOW THIS LINE # ##################################################################### # Setup the canvas -- canvas is the drawing area # Note that 'win' and 'canvas' are GLOBAL VARIABLES in this program win = Gui.Gui() win.title('Playing around with Gui') canvas = win.ca(width = CANVAS_WIDTH, height = CANVAS_HEIGHT) # run the main function main() # show the window win.mainloop() # Here are some colors you can use: 'white', 'gray', 'black', 'red', # 'green', 'blue', 'cyan', 'yellow', 'magenta', 'brown', 'darkgreen' # Hundreds of colors here: http://tmml.sourceforge.net/doc/tk/colors.html