xref: /original-bsd/lib/libplot/imagen/label.c (revision 62b63144)
1 /*-
2  * Copyright (c) 1985, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.proprietary.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)label.c	8.1 (Berkeley) 06/04/93";
10 #endif /* not lint */
11 
12 #include "imPcodes.h"
13 #include "imp.h"
14 extern imPcsize;
15 label(s)
16 char *s;
17 {
18 	register i,c;
19 	putch(imP_SET_ABS_H);
20 	putwd((int)((imPx-obotx)*scalex+botx)-imPcsize/2);
21 	putch(imP_SET_ABS_V);
22 	putwd((int)((imPy-oboty)*scaley+boty-(imPcsize/1.6)));
23 	for(i=0; c=s[i]; i++)
24 	{
25 		imPx += imPcsize/scalex;
26 		putch((c == ' ')?imP_SP:c);
27 	}
28 }
29