xref: /csrg-svn/lib/libplot/bitgraph/space.c (revision 61334)
148504Sbostic /*-
2*61334Sbostic  * Copyright (c) 1980, 1993
3*61334Sbostic  *	The Regents of the University of California.  All rights reserved.
448504Sbostic  *
548504Sbostic  * %sccs.include.proprietary.c%
619851Sdist  */
719851Sdist 
815423Sralph #ifndef lint
9*61334Sbostic static char sccsid[] = "@(#)space.c	8.1 (Berkeley) 06/04/93";
1048504Sbostic #endif /* not lint */
1115423Sralph 
1215423Sralph #include "bg.h"
1315423Sralph 
space(x0,y0,x1,y1)1415423Sralph space(x0,y0,x1,y1)
1515423Sralph int x0,y0,x1,y1;
1615423Sralph {
1715423Sralph 	double scalex, scaley;
1815423Sralph 	lowx = x0;
1915423Sralph 	lowy = y0;
2015423Sralph 	scalex = XMAX/(double)(x1-lowx);
2115423Sralph 	scaley = YMAX/(double)(y1-lowy);
2215423Sralph 	scale = scalex < scaley ? scalex : scaley;
2315423Sralph }
24