1 /* This example shows a very simple interface wrapping a few
2 primitive declarations */
9 typedef unsigned char Pixel;
11 /* Here are a few useful functions */
13 ColorMap *new_ColorMap(char *filename = 0);
14 void delete_ColorMap(ColorMap *cmap);
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);
24 /* And some useful constants */