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

« back to all changes in this revision

Viewing changes to Examples/GIFPlot/Tcl/simple/simple.i

  • 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
/* This example shows a very simple interface wrapping a few 
 
2
   primitive declarations */
 
3
 
 
4
%module simple
 
5
%{
 
6
#include "gifplot.h"
 
7
%}
 
8
 
 
9
typedef unsigned char Pixel;
 
10
 
 
11
/* Here are a few useful functions */
 
12
 
 
13
ColorMap    *new_ColorMap(char *filename = 0);
 
14
void         delete_ColorMap(ColorMap *cmap);
 
15
 
 
16
FrameBuffer *new_FrameBuffer(unsigned int width, unsigned int height);
 
17
void         delete_FrameBuffer(FrameBuffer *frame);
 
18
void         FrameBuffer_clear(FrameBuffer *frame, Pixel color);
 
19
void         FrameBuffer_line(FrameBuffer *frame, int x1, int y1, int x2, int y2, Pixel color);
 
20
void         FrameBuffer_box(FrameBuffer *frame, int x1, int y1, int x2, int y2, Pixel color);
 
21
void         FrameBuffer_circle(FrameBuffer *frame, int x1, int y1, int radius, Pixel color);
 
22
int          FrameBuffer_writeGIF(FrameBuffer *f, ColorMap *c, char *filename);
 
23
 
 
24
/* And some useful constants */
 
25
 
 
26
#define BLACK   0
 
27
#define WHITE   1
 
28
#define RED     2
 
29
#define GREEN   3
 
30
#define BLUE    4
 
31
#define YELLOW  5
 
32
#define CYAN    6
 
33
#define MAGENTA 7
 
34
 
 
35
 
 
36
 
 
37
 
 
38