# include "Ximage.h"

void Refresh (int mode) {

  int i;
  
  if (!USE_XWINDOW) return;
  if (HAVE_BACKING) return;

  /* XClearWindow   (graphic.display, graphic.window); */
  XSetForeground (graphic.display, graphic.gc, graphic.back);
  XFillRectangle (graphic.display, graphic.window, graphic.gc, 0, 0, graphic.dx, graphic.dy);
  XSetForeground (graphic.display, graphic.gc, graphic.fore);
  
  for (i = 0; i < Nsection; i++) {
    DrawFrame   (&section[i]);
    DrawObjects (&section[i]);
    DrawLabels  (&section[i]);
    DrawPtext   (&section[i]);
  }

  FlushDisplay ();
 
}

