X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=polygon.cc;h=e121e2cd19ff155f3af9a2ec4cdba443f78feeae;hb=8697ab57c9138aa2bb1657a971e4c2cc5e4a1606;hp=1c109c32f1bae3285ddc1606a0245a736459d21e;hpb=ea2a7fd04689794d3fb266e2b73bedb10953abb4;p=universe.git diff --git a/polygon.cc b/polygon.cc index 1c109c3..e121e2c 100644 --- a/polygon.cc +++ b/polygon.cc @@ -56,6 +56,7 @@ void Polygon::print_xfig(XFigTracer *tracer) { _nb_vertices, _x, _y); } +#ifdef X11_SUPPORT void Polygon::draw(SimpleWindow *window) { window->color(_red, _green, _blue); int x[_nb_vertices], y[_nb_vertices]; @@ -72,12 +73,13 @@ void Polygon::draw_contours(SimpleWindow *window) { x[n] = int(_x[n]); y[n] = int(_y[n]); } - // window->color(0.0, 0.0, 0.0); - window->color(1.0, 1.0, 1.0); + window->color(0.0, 0.0, 0.0); + // window->color(1.0, 1.0, 1.0); for(int n = 0; n < _nb_vertices; n++) { window->draw_line(x[n], y[n], x[(n+1)%_nb_vertices], y[(n+1)%_nb_vertices]); } } +#endif #ifdef CAIRO_SUPPORT void Polygon::draw(cairo_t* context_resource) { @@ -94,8 +96,8 @@ void Polygon::draw(cairo_t* context_resource) { void Polygon::draw_contours(cairo_t* context_resource) { cairo_set_line_width(context_resource, 1.0); - // cairo_set_source_rgb (context_resource, 0.0, 0.0, 0.0); - cairo_set_source_rgb (context_resource, 1.0, 1.0, 1.0); + cairo_set_source_rgb (context_resource, 0.0, 0.0, 0.0); + // cairo_set_source_rgb (context_resource, 1.0, 1.0, 1.0); cairo_move_to(context_resource, _x[0], _y[0]); for(int n = 0; n < _nb_vertices; n++) { cairo_line_to(context_resource, _x[n], _y[n]);