xref: /csrg-svn/lib/libplot/imagen/label.c (revision 48519)
1*48519Sbostic /*-
2*48519Sbostic  * Copyright (c) 1985 The Regents of the University of California.
3*48519Sbostic  * All rights reserved.
4*48519Sbostic  *
5*48519Sbostic  * %sccs.include.proprietary.c%
624995Ssam  */
724995Ssam 
824995Ssam #ifndef lint
9*48519Sbostic static char sccsid[] = "@(#)label.c	5.2 (Berkeley) 04/22/91";
10*48519Sbostic #endif /* not lint */
1124995Ssam 
1224995Ssam #include "imPcodes.h"
1324995Ssam #include "imp.h"
1424995Ssam extern imPcsize;
1524995Ssam label(s)
1624995Ssam char *s;
1724995Ssam {
1824995Ssam 	register i,c;
1924995Ssam 	putch(imP_SET_ABS_H);
2024995Ssam 	putwd((int)((imPx-obotx)*scalex+botx)-imPcsize/2);
2124995Ssam 	putch(imP_SET_ABS_V);
2224995Ssam 	putwd((int)((imPy-oboty)*scaley+boty-(imPcsize/1.6)));
2324995Ssam 	for(i=0; c=s[i]; i++)
2424995Ssam 	{
2524995Ssam 		imPx += imPcsize/scalex;
2624995Ssam 		putch((c == ' ')?imP_SP:c);
2724995Ssam 	}
2824995Ssam }
29