(unit/sig (startwin makecolor setpixel seq width height) (import plt:userspace^) ; Sequence Operator (define (seq a b) (begin a b)) ; Window Size (define width 500) (define height 500) ; Make a width x height frame (define frame (make-object frame% "Mandelbrot" #f width height)) ; Make the drawing area (define canvas (make-object canvas% frame)) ; Get the canvas's drawing context (define dc (send canvas get-dc)) ; Set the drawing color (define (setcolor color) (send dc set-pen (make-object pen% color 1 'solid))) ; Make a color out of an (r,g,b)-value (define (makecolor r g b) (make-object color% r g b)) ; Set a point on the canvas in the specified color (define (setpixel x y color) (setcolor color) (send dc draw-point x y) #t) (define (startwin) (send frame show #t) #t) )