Translated GIFPlot example to Guile Scheme.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@740 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
196f66f49c
commit
ce21bf47bf
9 changed files with 191 additions and 0 deletions
26
SWIG/Examples/GIFPlot/Guile/simple/runme.scm
Normal file
26
SWIG/Examples/GIFPlot/Guile/simple/runme.scm
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
;; Draw some simple shapes
|
||||
(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)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue