# # Fill the window with a color gradient from black to gold (255, 192, 64). # from SimpleGraphics import * # # Demonstrate that the gradient continues to be drawn correctly, even # when resize is used to change the size of the window. # resize(200, 1000) # # For each row in the window... # for row in range(0, getHeight()): # # Compute the correct color for the current row. # red = row / (getHeight() - 1) * 255 green = row / (getHeight() - 1) * 192 blue = row / (getHeight() - 1) * 64 setColor(red, green, blue) # # Draw a horizontal line across the window. # line(0, row, getWidth() - 1, row)