xref: /original-bsd/lib/libplot/imagen/scale.c (revision c3e32dec)
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[] = "@(#)scale.c	8.1 (Berkeley) 06/04/93";
10 #endif /* not lint */
11 
12 extern float scalex;
13 extern float scaley;
14 extern int scaleflag;
15 scale(i,x,y)
16 char i;
17 float x,y;
18 {
19 	switch(i) {
20 	default:
21 		return;
22 	case 'c':
23 		x *= 2.54;
24 		y *= 2.54;
25 	case 'i':
26 		x /= 200;
27 		y /= 200;
28 	case 'u':
29 		scalex = 1/x;
30 		scaley = 1/y;
31 	}
32 	scaleflag = 1;
33 }
34