xref: /original-bsd/lib/libplot/hp7221/line.c (revision 2782e408)
16a411f21Sbostic /*-
2*2782e408Sbostic  * Copyright (c) 1980, 1993
3*2782e408Sbostic  *	The Regents of the University of California.  All rights reserved.
46a411f21Sbostic  *
56a411f21Sbostic  * %sccs.include.proprietary.c%
68e82faefSdist  */
78e82faefSdist 
8abde7e59Sralph #ifndef lint
9*2782e408Sbostic static char sccsid[] = "@(#)line.c	8.1 (Berkeley) 06/04/93";
106a411f21Sbostic #endif /* not lint */
11abde7e59Sralph 
12abde7e59Sralph #include "hp7221.h"
13abde7e59Sralph 
line(x0,y0,x1,y1)14abde7e59Sralph line(x0,y0,x1,y1)
15abde7e59Sralph int x0,y0,x1,y1;
16abde7e59Sralph {
17abde7e59Sralph 	if(scaleX(x0)==currentx && scaleY(y0)==currenty)
18abde7e59Sralph 		cont(x1,y1);
19abde7e59Sralph 	else if(scaleX(x1)==currentx && scaleY(y1)==currenty)
20abde7e59Sralph 		cont(x0,y0);
21abde7e59Sralph 	else{
22abde7e59Sralph 		move(x0,y0);
23abde7e59Sralph 		cont(x1,y1);
24abde7e59Sralph 	}
25abde7e59Sralph }
26