xref: /csrg-svn/lib/libplot/bitgraph/line.c (revision 61330)
148504Sbostic /*-
2*61330Sbostic  * Copyright (c) 1980, 1993
3*61330Sbostic  *	The Regents of the University of California.  All rights reserved.
448504Sbostic  *
548504Sbostic  * %sccs.include.proprietary.c%
619851Sdist  */
719851Sdist 
815418Sralph #ifndef lint
9*61330Sbostic static char sccsid[] = "@(#)line.c	8.1 (Berkeley) 06/04/93";
1048504Sbostic #endif /* not lint */
1115418Sralph 
1215418Sralph #include "bg.h"
1315418Sralph 
line(x0,y0,x1,y1)1415418Sralph line(x0,y0,x1,y1)
1515418Sralph int x0,y0,x1,y1;
1615418Sralph {
1715418Sralph 	if(scaleX(x0)==currentx && scaleY(y0)==currenty)
1815418Sralph 		cont(x1,y1);
1915418Sralph 	else if(scaleX(x1)==currentx && scaleY(y1)==currenty)
2015418Sralph 		cont(x0,y0);
2115418Sralph 	else{
2215418Sralph 		move(x0,y0);
2315418Sralph 		cont(x1,y1);
2415418Sralph 	}
2515418Sralph }
26