summaryrefslogtreecommitdiff
path: root/Examples/GIFPlot/Tcl/simple/runme.tcl
blob: e3f41266c13f69f77d9e28f2d4d64ccf5c73db49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Draw some simple shapes
puts "Drawing some basic shapes"

catch { load ./simple[info sharedlibextension] simple}

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