xref: /original-bsd/lib/libplot/bitgraph/line.c (revision 775a9ebd)
1466d507cSbostic /*-
2*775a9ebdSbostic  * Copyright (c) 1980, 1993
3*775a9ebdSbostic  *	The Regents of the University of California.  All rights reserved.
4466d507cSbostic  *
5466d507cSbostic  * %sccs.include.proprietary.c%
627fac43cSdist  */
727fac43cSdist 
8a7633dceSralph #ifndef lint
9*775a9ebdSbostic static char sccsid[] = "@(#)line.c	8.1 (Berkeley) 06/04/93";
10466d507cSbostic #endif /* not lint */
11a7633dceSralph 
12a7633dceSralph #include "bg.h"
13a7633dceSralph 
line(x0,y0,x1,y1)14a7633dceSralph line(x0,y0,x1,y1)
15a7633dceSralph int x0,y0,x1,y1;
16a7633dceSralph {
17a7633dceSralph 	if(scaleX(x0)==currentx && scaleY(y0)==currenty)
18a7633dceSralph 		cont(x1,y1);
19a7633dceSralph 	else if(scaleX(x1)==currentx && scaleY(y1)==currenty)
20a7633dceSralph 		cont(x0,y0);
21a7633dceSralph 	else{
22a7633dceSralph 		move(x0,y0);
23a7633dceSralph 		cont(x1,y1);
24a7633dceSralph 	}
25a7633dceSralph }
26