# include "Ximage.h"
# define MAX_STRING 100

int Reconfig (Graphic *graphic, Layout *layout, XEvent *event) {
  
  if ((graphic[0].dx == event[0].xconfigure.width) &&
      (graphic[0].dy == event[0].xconfigure.height)) 
    return (TRUE);

  graphic[0].dx = MAX(event[0].xconfigure.width,  MIN_WIDTH); 
  graphic[0].dy = MAX(event[0].xconfigure.height, MIN_HEIGHT);

  XClearWindow (graphic[0].display, graphic[0].window);
  PositionPictures (layout, graphic);
  CreateColorbar (layout, graphic);
  CreatePicture (layout, graphic);
  Remap (graphic, layout, &layout[0].matrix); 
  Refresh (graphic, layout, 1);
  return (TRUE);
}
