xref: /csrg-svn/lib/libplot/imagen/label.c (revision 24995)
1*24995Ssam /*
2*24995Ssam  * Copyright (c) 1985 Regents of the University of California.
3*24995Ssam  * All rights reserved.  The Berkeley software License Agreement
4*24995Ssam  * specifies the terms and conditions for redistribution.
5*24995Ssam  */
6*24995Ssam 
7*24995Ssam #ifndef lint
8*24995Ssam static char sccsid[] = "@(#)label.c	5.1 (Berkeley) 09/21/85";
9*24995Ssam #endif not lint
10*24995Ssam 
11*24995Ssam #include "imPcodes.h"
12*24995Ssam #include "imp.h"
13*24995Ssam extern imPcsize;
14*24995Ssam label(s)
15*24995Ssam char *s;
16*24995Ssam {
17*24995Ssam 	register i,c;
18*24995Ssam 	putch(imP_SET_ABS_H);
19*24995Ssam 	putwd((int)((imPx-obotx)*scalex+botx)-imPcsize/2);
20*24995Ssam 	putch(imP_SET_ABS_V);
21*24995Ssam 	putwd((int)((imPy-oboty)*scaley+boty-(imPcsize/1.6)));
22*24995Ssam 	for(i=0; c=s[i]; i++)
23*24995Ssam 	{
24*24995Ssam 		imPx += imPcsize/scalex;
25*24995Ssam 		putch((c == ' ')?imP_SP:c);
26*24995Ssam 	}
27*24995Ssam }
28