xref: /csrg-svn/lib/libplot/gigi/line.c (revision 19974)
1*19974Sdist /*
2*19974Sdist  * Copyright (c) 1980 Regents of the University of California.
3*19974Sdist  * All rights reserved.  The Berkeley software License Agreement
4*19974Sdist  * specifies the terms and conditions for redistribution.
5*19974Sdist  */
6*19974Sdist 
715491Sralph #ifndef lint
8*19974Sdist static char sccsid[] = "@(#)line.c	5.1 (Berkeley) 05/07/85";
9*19974Sdist #endif not lint
1015491Sralph 
1115491Sralph #include "gigi.h"
1215491Sralph 
1315491Sralph line(x0,y0,x1,y1)
1415491Sralph int x0,y0,x1,y1;
1515491Sralph {
1615491Sralph 	if(xsc(x0)==currentx && ysc(y0)==currenty)
1715491Sralph 		cont(x1,y1);
1815491Sralph 	else if(xsc(x1)==currentx && ysc(y1)==currenty)
1915491Sralph 		cont(x0,y0);
2015491Sralph 	else{
2115491Sralph 		move(x0,y0);
2215491Sralph 		cont(x1,y1);
2315491Sralph 	}
2415491Sralph }
25