# include "Ximage.h"

int SetLimits () {
  
  int i;
  double xmin, xmax, ymin, ymax;
  Layout *layout;

  layout = &section[TheSection];

  KiiScanMessage (sock, "%lf %lf %lf %lf", &xmin, &xmax, &ymin, &ymax);

  layout[0].axis[2].min = layout[0].axis[0].min = xmin;
  layout[0].axis[2].max = layout[0].axis[0].max = xmax;
  layout[0].axis[3].min = layout[0].axis[1].min = ymin; 
  layout[0].axis[3].max = layout[0].axis[1].max = ymax;
  
  for (i = 0; i < layout[0].Nobjects; i++) {
    layout[0].objects[i].x0 = xmin;
    layout[0].objects[i].x1 = xmax;
    layout[0].objects[i].y0 = ymin;
    layout[0].objects[i].y1 = ymax;
  }

  if (USE_XWINDOW) XClearWindow (graphic.display, graphic.window);
  Refresh (1);

  return (TRUE);
  
}
