-////////////////////////////////////////////////////////////////////////////////
-// This program is free software; you can redistribute it and/or //
-// modify it under the terms of the GNU General Public License //
-// version 2 as published by the Free Software Foundation. //
-// //
-// This program is distributed in the hope that it will be useful, but //
-// WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
-// General Public License for more details. //
-// //
-// Written and (C) by François Fleuret //
-// Contact <francois.fleuret@epfl.ch> for comments & bug reports //
-////////////////////////////////////////////////////////////////////////////////
+// Written and (C) by Francois Fleuret
+// Contact <francois.fleuret@idiap.ch> for comments & bug reports
+
+#include <string.h>
#include "universe.h"
}
_polygons[_nb_polygons++] = p;
} else {
- cerr << "To many polygons!" << endl;
+ cerr << "Too many polygons!" << endl;
exit(1);
}
}
return 0;
}
-void Universe::print_fig(ostream &os) {
- os << "#FIG 3.2" << endl;
- os << "Portrait" << endl;
- os << "Center" << endl;
- os << "Metric" << endl;
- os << "A4 " << endl;
- os << "100.00" << endl;
- os << "Single" << endl;
- os << "-2" << endl;
- os << "1200 2" << endl;
- for(int n = 0; n < _nb_polygons; n++) if(_polygons[n]) _polygons[n]->print_fig(os);
+void Universe::print_fig(XFigTracer *tracer) {
+ for(int n = 0; n < _nb_polygons; n++) {
+ if(_polygons[n]) {
+ _polygons[n]->print_fig(tracer);
+ }
+ }
}
void Universe::draw(SimpleWindow *window) {