PageRenderTime 44ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/ttn-post-libtool-1-4-3-upgrade/SWIG/Examples/GIFPlot/Guile/simple/runme.scm

#
Lisp | 30 lines | 12 code | 11 blank | 7 comment | 0 complexity | fa71b80b7cf40fbd3ff6f21c3ff87ca4 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. ;;; Draw some simple shapes
  2. ;; Use the wrapped GIFPlot library
  3. (use-modules (simple))
  4. (display "Drawing some basic shapes\n")
  5. (define cmap (new-ColorMap))
  6. (define f (new-FrameBuffer 400 400))
  7. ;; Clear the picture
  8. (FrameBuffer-clear f (BLACK))
  9. ;; Make a red box
  10. (FrameBuffer-box f 40 40 200 200 (RED))
  11. ;; Make a blue circle
  12. (FrameBuffer-circle f 200 200 40 (BLUE))
  13. ;; Make green line
  14. (FrameBuffer-line f 10 390 390 200 (GREEN))
  15. ;; Write an image out to disk
  16. (FrameBuffer-writeGIF f cmap "image.gif")
  17. (display "Wrote image.gif\n")
  18. (delete-FrameBuffer f)
  19. (delete-ColorMap cmap)