X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=polygon.h;h=e2d35f6bc9ce3d0ffdffc8aa627a8964014bdc4a;hb=6408d9fe6e1b82ad9aa71d6e1702ec100a8c3ca1;hp=d7caa9d9853647dc9dc28ce7f254cd34c90304db;hpb=ba46b057f3e2613a86f2dea7fa8022990482c735;p=universe.git diff --git a/polygon.h b/polygon.h index d7caa9d..e2d35f6 100644 --- a/polygon.h +++ b/polygon.h @@ -1,23 +1,20 @@ -//////////////////////////////////////////////////////////////////////////////// -// 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 for comments & bug reports // -//////////////////////////////////////////////////////////////////////////////// +// Written and (C) by Francois Fleuret +// Contact for comments & bug reports #ifndef POLYGON_H #define POLYGON_H #include "misc.h" +#include "canvas.h" + +#ifdef XFIG_SUPPORT +#include "xfig_tracer.h" +#endif + +#ifdef X11_SUPPORT #include "simple_window.h" +#endif class Polygon { struct Triangle { @@ -76,9 +73,19 @@ public: Polygon *clone(); - void print_fig(ostream &os); +#ifdef XFIG_SUPPORT + void color_xfig(XFigTracer *tracer); + void print_xfig(XFigTracer *tracer); +#endif + +#ifdef X11_SUPPORT void draw(SimpleWindow *window); void draw_contours(SimpleWindow *window); +#endif + + void draw(Canvas *canvas); + void draw_contours(Canvas *canvas); + void set_vertex(int k, scalar_t x, scalar_t y); void set_position(scalar_t center_x, scalar_t center_y, scalar_t theta); void set_speed(scalar_t dcenter_x, scalar_t dcenter_y, scalar_t dtheta);