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

  1.  
  2. /* function to draw a box from an lower right corner position */
  3. grbxlr(x,y,side,color)
  4. int x;         /* x coordinate of lower right corner of box */
  5. int y;         /* y coordinate of lower right corner of box */
  6. int side;     /* length of side of box */
  7. int color;     /* foreground color of box */
  8. {
  9.     int xc[5]; /* x coordinates of corner points */
  10.     int yc[5]; /* y coordinates of corner points */
  11.     int i; /* temp loop counter */
  12.  
  13. /* set up corner points */
  14.     xc[0]=xc[4]=xc[1]=x-side+1;
  15.     xc[2]=xc[3]=x;
  16.     yc[0]=yc[3]=yc[4]=y-side+1;
  17.     yc[1]=yc[2]=y;
  18.     
  19. /* plot points */
  20.     for(i = 0; i < 4; ++i)
  21.         eg_line(xc[i],yc[i],xc[i+1],yc[i+1],color);
  22.     return(0);
  23. }
  24.