#define POLYGON_H
#include "misc.h"
-#include "simple_window.h"
+#include "canvas.h"
+
#include "xfig_tracer.h"
-#ifdef CAIRO_SUPPORT
-#include <cairo.h>
+#ifdef X11_SUPPORT
+#include "simple_window.h"
#endif
class Polygon {
void color_xfig(XFigTracer *tracer);
void print_xfig(XFigTracer *tracer);
+#ifdef X11_SUPPORT
void draw(SimpleWindow *window);
void draw_contours(SimpleWindow *window);
-
-#ifdef CAIRO_SUPPORT
- void draw(cairo_t* context_resource);
- void draw_contours(cairo_t* context_resource);
#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);