home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 11 / 11.iso / m / m242 / 2.ddi / VER2FUNC.ZIP / GRBXCTC.C < prev    next >
Encoding:
Text File  |  1989-10-16  |  639 b   |  26 lines

  1.  
  2.  
  3. /* function to draw a color box from a center point position */
  4. grbxctc(x,y,side,color)
  5. int x;         /* x coordinate of center point */
  6. int y;         /* y coordinate of center point */
  7. int side;     /* length of side of box */
  8. int color;     /* foreground color of line */
  9. {
  10.     int x1; /* x coordinate of upper left */
  11.     int y1; /* y coordinate of upper left */
  12.     int x2; /* x coordinate of lower right */
  13.     int y2; /* y coordinate of lower right */
  14.  
  15. /* set points */
  16.     x1 = x - (side/2);
  17.     y1 = y - (side/2);
  18.     x2 = x + (side/2);
  19.     y2 = y + (side/2);
  20.  
  21.  /* call box fill routine */
  22.  
  23.     eg_rectangle(x1,y1,x2,y2,color,1,-1);
  24.     return(0);
  25. }
  26.