(module apfel100 mzscheme (provide farbe win setpixel seq width height setWidth setHeight drawLine) (require (lib "graphics.ss" "graphics")) (open-graphics) ; Sequence Operator (define (seq a b) (begin a b)) ; Window Size (define width 100) (define height 70) (define (setWidth w) (set! width w)) (define (setHeight h) (set! height h)) (define %win error) ; Make a width x height frame (define win (set! %win (open-viewport "Apfelmaennchen" width height))) (define (farbe r g b) (make-rgb r g b)) ; Set a point on the canvas in the specified color (define (setpixel x y color) ((draw-pixel %win) (make-posn x y) color) #t) (define (drawLine c1 c2 color) ((draw-line %win) c1 c2 color)) )