|
|
1.1 root 1: /*
2: * Copyright (c) 1980, 1986 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: */
6:
7: #ifndef lint
8: static char sccsid[] = "@(#)circle.c 6.1 (Berkeley) 8/29/86";
9: #endif not lint
10:
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: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.