swig/Examples/GIFPlot/Guile/simple/runme.scm
Matthias Köppe 27705dc6ff Updated Guile modules.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@815 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-09-03 20:06:32 +00:00

30 lines
586 B
Scheme

;;; Draw some simple shapes
;; Use the wrapped GIFPlot library
(use-modules (simple))
(display "Drawing some basic shapes\n")
(define cmap (new-ColorMap))
(define f (new-FrameBuffer 400 400))
;; Clear the picture
(FrameBuffer-clear f (BLACK))
;; Make a red box
(FrameBuffer-box f 40 40 200 200 (RED))
;; Make a blue circle
(FrameBuffer-circle f 200 200 40 (BLUE))
;; Make green line
(FrameBuffer-line f 10 390 390 200 (GREEN))
;; Write an image out to disk
(FrameBuffer-writeGIF f cmap "image.gif")
(display "Wrote image.gif\n")
(delete-FrameBuffer f)
(delete-ColorMap cmap)