home *** CD-ROM | disk | FTP | other *** search
-
- /* function to draw a color rectangle from a center point position */
- grrtctc(x,y,w,l,color)
- int x; /* x coordinate of center point */
- int y; /* y coordinate of center point */
- int w; /* width of rectangle */
- int l; /* length of rectangle */
- int color; /* color of rectangle */
- {
- int x1; /* x coordinate of upper left */
- int y1; /* y coordinate of upper left */
- int x2; /* x coordinate of lower right */
- int y2; /* y coordinate of lower right */
-
- /* set points */
- x1 = x-(w/2);
- y1 = y-(l/2);
- x2 = x+(w/2);
- y2 = y+(l/2);
-
- /* call box fill routine */
- eg_rectangle(x1,y1,x2,y2,color,1,-1);
- return(0);
- }