swig/SWIG/Examples/GIFPlot/Tcl/simple/runme.tcl
Dave Beazley a59e9a4405 Added GIFPlot example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@219 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-02-11 05:37:31 +00:00

28 lines
565 B
Tcl

# Draw some simple shapes
puts "Drawing some basic shapes"
catch { load ./simple.so simple}
catch { load ./simple.dll simple} ;# Windows
set cmap [new_ColorMap]
set 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
puts "Wrote image.gif"
delete_FrameBuffer $f
delete_ColorMap $cmap