BSD 4_3_Tahoe release
[unix-history] / usr / src / usr.lib / libplot / grn / circle.c
CommitLineData
491ba2ce
KS
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
ca67e7b4 8static char sccsid[] = "@(#)circle.c 6.1 (Berkeley) 8/29/86";
491ba2ce
KS
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 */
24circle(x, y, r)
25int 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}