home *** CD-ROM | disk | FTP | other *** search
-
- /* function to draw a rectangle from an lower left corner positon */
- grrtll(x,y,w,l,color)
- int x; /* x coordinate of lower left position */
- int y; /* y coordinate of lower left position */
- int w; /* width of rectangle */
- int l; /* length of rectangle */
- int color; /* color of rectangle */
- {
- 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[1]=xc[4]=x;
- xc[2]=xc[3]=x+w-1;
- yc[0]=yc[3]=yc[4]=y-l+1;
- yc[2]=yc[1]=y;
-
- /* plot points */
- for(i = 0; i < 4; ++i)
- eg_line(xc[i],yc[i],xc[i+1],yc[i+1],color);
- return(0);
- }