home *** CD-ROM | disk | FTP | other *** search
-
- /* function to draw a box from an lower right corner position */
- grbxlr(x,y,side,color)
- int x; /* x coordinate of lower right corner of box */
- int y; /* y coordinate of lower right corner of box */
- int side; /* length of side of box */
- int color; /* foreground color of box */
- {
- int xc[5]; /* x coordinates of corner points */
- int yc[5]; /* y coordinates of corner points */
- int i; /* temp loop counter */
-
- /* set up corner points */
- xc[0]=xc[4]=xc[1]=x-side+1;
- xc[2]=xc[3]=x;
- yc[0]=yc[3]=yc[4]=y-side+1;
- yc[1]=yc[2]=y;
-
- /* plot points */
- for(i = 0; i < 4; ++i)
- eg_line(xc[i],yc[i],xc[i+1],yc[i+1],color);
- return(0);
- }