gd_init-screen(640, 480, 1)

oldx = 0
oldy = 0
drawing = false
color = 0

while true:
    if (mouse:get-button 1)
                (if drawing
                    ;;(draw-line oldx oldy (mouse:get-x) (mouse:get-y))
                    (draw-rect (mouse:get-x) (mouse:get-y) 10 10 #t)
                    (set! drawing #t))
                (set! color (+ color 10))
                (set-fg-color color)
                (set! oldx  (mouse:get-x)) 
                (set! oldy  (mouse:get-y)))
               (else
                (set! drawing #f)))))

;; EOF ;;

