home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / xgalaga-2_0_tar.gz / xgalaga-2_0_tar / xgalaga-2.0 / libsprite / fill.c < prev    next >
C/C++ Source or Header  |  1998-04-12  |  715b  |  29 lines

  1. #include "allincludes.h"
  2.  
  3. void
  4. W_FillArea(window, x, y, width, height, color)
  5.     W_Window window;
  6.     int     x, y;
  7.     unsigned int width, height;
  8.     W_Color color;
  9. {
  10.     struct window *win;
  11.  
  12. #ifdef DEBUG
  13.     printf("Clearing (%d %d) x (%d %d) with %d on %d\n", x, y, width, height,
  14.        color, window);
  15. #endif
  16.     win = W_Void2Window(window);
  17.     switch (win->type) {
  18.     case WIN_GRAPH:
  19.     XFillRectangle(W_Display, win->drawable, colortable[color].contexts[0],
  20.                x, y, width, height);
  21.     break;
  22.     default:
  23.     XFillRectangle(W_Display, win->drawable, colortable[color].contexts[0],
  24.             WIN_EDGE + x * W_Textwidth, MENU_PAD + y * W_Textheight,
  25.                width * W_Textwidth, height * W_Textheight);
  26.     }
  27. }
  28.  
  29.