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

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