# include "Ximage.h"

int Center (int sock) {

  int zoom;
  double X, Y;
  Graphic *graphic;
  Section *section;
  KapaImageWidget *image;

  KiiScanMessage (sock, "%lf %lf %d", &X,  &Y, &zoom);

  graphic = GetGraphic();
  section = GetActiveSection();
  image = section->image;
  if (image == NULL) return (TRUE);

  image[0].picture.X = X;
  image[0].picture.Y = Y;
  if ((zoom != 0) && (zoom != -1)) {
    image[0].picture.expand = zoom;
  }

  if (USE_XWINDOW) {
    Remap (graphic, image);
    Refresh ();
    XFlush (graphic[0].display);
  }

  return (TRUE);
}

