from graphics import DrawingWindow

def drawLine(canvas, x, y, x2, y2):
    canvas.drawLine(x, y, x2, y2, "black")

def fillWithColor(canvas, x, y):
    # Delete these next few lines of code.
    oldColor = canvas.getPixel(x, y)
    print "The pixel was colored " + oldColor
    canvas.setPixel(x, y, "green")
    print "... and now I made it green!"
    # And replace them with your code for the body of the fillWithColor( ) function instead.
    


canvas = DrawingWindow("csci 110 drawing window", 400, 400)
canvas.drawingspeed = 11
canvas.zoom = 16
canvas.onMouseDrag(drawLine)
canvas.onMouseDoubleClick(fillWithColor)
canvas.waitforexit()
