xref: /csrg-svn/lib/libplot/hp7221/line.c (revision 19978)
1*19978Sdist /*
2*19978Sdist  * Copyright (c) 1980 Regents of the University of California.
3*19978Sdist  * All rights reserved.  The Berkeley software License Agreement
4*19978Sdist  * specifies the terms and conditions for redistribution.
5*19978Sdist  */
6*19978Sdist 
715472Sralph #ifndef lint
8*19978Sdist static char sccsid[] = "@(#)line.c	5.1 (Berkeley) 05/07/85";
9*19978Sdist #endif not lint
1015472Sralph 
1115472Sralph #include "hp7221.h"
1215472Sralph 
1315472Sralph line(x0,y0,x1,y1)
1415472Sralph int x0,y0,x1,y1;
1515472Sralph {
1615472Sralph 	if(scaleX(x0)==currentx && scaleY(y0)==currenty)
1715472Sralph 		cont(x1,y1);
1815472Sralph 	else if(scaleX(x1)==currentx && scaleY(y1)==currenty)
1915472Sralph 		cont(x0,y0);
2015472Sralph 	else{
2115472Sralph 		move(x0,y0);
2215472Sralph 		cont(x1,y1);
2315472Sralph 	}
2415472Sralph }
25