# include "Ximage"
# include "ScrollBars.h"

void
ScrollBars (display, window, gc, height, width, SB_x, SB_y, f_x, f_y)
Display *display;
Window window;
GC gc;
int width, height, SB_x, SB_y;
double f_x, f_y;
{
  
  int x, y;

  y = height - SB_y;
  XDrawLine (display, window, gc, 0, y, width, y);
  XDrawLine (display, window, gc, SB_x, 0, SB_x, height);
  XDrawLine (display, window, gc, 0, SB_x, SB_x, SB_x);
  x = width - SB_y;
  y = height - SB_y;
  XDrawLine (display, window, gc, x, y, x, height);
  y = height - SB_x - SB_y;
  XDrawLine (display, window, gc, 0, y, SB_x, y);
  x = SB_y + SB_x;
  y = height - SB_y;
  XDrawLine (display, window, gc, x, y, x, height);
  x = (width - 2*SB_y - SB_x) * f_x + SB_x + SB_y;
  y = (height - 2*SB_x - SB_y) * f_y + SB_x;
  XDrawLine (display, window, gc, x, height - SB_y, x, height);
  XDrawLine (display, window, gc, x + 1, height - SB_y, x + 1, height);
  XDrawLine (display, window, gc, 0, y, SB_x, y);
  XDrawLine (display, window, gc, 0, y+1, SB_x, y+1);
  y = height - SB_y;
  XFillRectangle (display, window, gc, 0, y, SB_x, SB_y);

}


