Cleaned up a bit. SimpleWindow now embed the cairo fields to allow proper deallocatio...
[universe.git] / xfig_tracer.h
1
2 ////////////////////////////////////////////////////////////////////
3 // START_IP_HEADER                                                //
4 //                                                                //
5 // Written by Francois Fleuret                                    //
6 // Contact <francois.fleuret@idiap.ch> for comments & bug reports //
7 //                                                                //
8 // END_IP_HEADER                                                  //
9 ////////////////////////////////////////////////////////////////////
10
11 #ifndef XFIG_TRACER_H
12 #define XFIG_TRACER_H
13
14 #include <iostream>
15 #include <fstream>
16
17 using namespace std;
18
19 #include "misc.h"
20
21 class XFigTracer {
22   ofstream *_file;
23   int _nb_user_colors;
24   static const int max_nb_user_colors = 100;
25   int _palette_red[max_nb_user_colors];
26   int _palette_green[max_nb_user_colors];
27   int _palette_blue[max_nb_user_colors];
28   int user_color(int red, int green, int blue);
29 public:
30   XFigTracer(const char *name);
31   ~XFigTracer();
32   void add_color(int red, int green, int blue);
33   void draw_polygon(int red, int green, int blue,
34                     int nb_vertices, scalar_t *x, scalar_t *y);
35 };
36
37 #endif