home *** CD-ROM | disk | FTP | other *** search
-
- /* function to draw a box from an upper right corner position */
- grbxur(x,y,side,color)
- int x; /* x coordinate of upper right corner of box */
- int y; /* y coordinate of upper right corner of box */
- int side; /* length of side of box */
- int color; /* foreground color of box */
- {
- int xc[5]; /* column coordinates of corner points */
- int yc[5]; /* row 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;
- yc[1]=yc[2]=y+side-1;
-
- /* plot points */
- for(i = 0; i < 4; ++i)
- eg_line(xc[i],yc[i],xc[i+1],yc[i+1],color);
- return(0);
- }