X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=polygon.h;h=5a000be6c22d8e2e7cf0bde17089d9bf18a504e0;hb=01b5ab3f0b75969230e0f9c41e55992b3d29edee;hp=9d35d3bb6d9d1ed93baeea63ea4652651aaaba0e;hpb=3caf13085a6ae1ae41d6f489c8b69206b0ffa48d;p=universe.git diff --git a/polygon.h b/polygon.h index 9d35d3b..5a000be 100644 --- a/polygon.h +++ b/polygon.h @@ -6,7 +6,13 @@ #define POLYGON_H #include "misc.h" +#include "canvas.h" + +#include "xfig_tracer.h" + +#ifdef X11_SUPPORT #include "simple_window.h" +#endif class Polygon { struct Triangle { @@ -65,9 +71,17 @@ public: Polygon *clone(); - void print_fig(ostream &os); + void color_xfig(XFigTracer *tracer); + void print_xfig(XFigTracer *tracer); + +#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);