~ubuntu-branches/ubuntu/maverick/swig1.3/maverick

« back to all changes in this revision

Viewing changes to Examples/GIFPlot/Perl/simple/runme.pl

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Landschoff
  • Date: 2002-03-29 01:56:07 UTC
  • Revision ID: james.westby@ubuntu.com-20020329015607-c0wt03xu8oy9ioj7
Tags: upstream-1.3.11
ImportĀ upstreamĀ versionĀ 1.3.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Draw some simple shapes
 
2
print "Drawing some basic shapes\n";
 
3
 
 
4
use simple;
 
5
 
 
6
$cmap = simple::new_ColorMap();
 
7
$f    = simple::new_FrameBuffer(400,400);
 
8
 
 
9
# Clear the picture
 
10
simple::FrameBuffer_clear($f,$simple::BLACK);
 
11
 
 
12
# Make a red box
 
13
simple::FrameBuffer_box($f,40,40,200,200,$simple::RED);
 
14
 
 
15
# Make a blue circle
 
16
simple::FrameBuffer_circle($f,200,200,40,$simple::BLUE);
 
17
 
 
18
# Make green line
 
19
simple::FrameBuffer_line($f,10,390,390,200, $simple::GREEN);
 
20
 
 
21
# Write an image out to disk
 
22
 
 
23
simple::FrameBuffer_writeGIF($f,$cmap,"image.gif");
 
24
print "Wrote image.gif\n";
 
25
 
 
26
simple::delete_FrameBuffer($f);
 
27
simple::delete_ColorMap($cmap);
 
28