1 /*- 2 * Copyright (c) 1980, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)circle.c 8.1 (Berkeley) 06/04/93"; 10 #endif /* not lint */ 11 12 #include "grnplot.h" 13 14 /*--------------------------------------------------------- 15 * Circle draws a circle. 16 * 17 * Results: None. 18 * 19 * Side Effects: 20 * A circle of radius r is drawn at (x,y). 21 * The current position is set to (x,y); 22 *--------------------------------------------------------- 23 */ 24 circle(x, y, r) 25 int x, y, r; 26 { 27 if (!ingrnfile) erase(); 28 endvector(); 29 printf("ARC\n"); 30 outxy(x,y); 31 outxy(x+r,y); 32 outxy(x,y+r); 33 outxy(x,y-r); 34 outxy(x+r,y); 35 outxy(x-r,y); 36 printf("*\n%d 0\n0\n",linestyle); 37 curx=x; 38 cury=y; 39 } 40