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

  1.  
  2. /* function to draw a color rectangle from a center point position */
  3. grrtctc(x,y,w,l,color)
  4. int x;         /* x coordinate of center point */
  5. int y;         /* y coordinate of center point */
  6. int w;         /* width of rectangle */
  7. int l;        /* length of rectangle */
  8. int color;     /* color of rectangle */
  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-(w/2);
  17.     y1 = y-(l/2);
  18.     x2 = x+(w/2);
  19.     y2 = y+(l/2);
  20.  
  21. /* call box fill routine */
  22.     eg_rectangle(x1,y1,x2,y2,color,1,-1);
  23.     return(0);
  24. }
  25.