summaryrefslogtreecommitdiff
path: root/dviware/beebe/src/rulepxl.h
blob: 626679c333b5c917ff187cbd102595a2e3421338 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* -*-C-*- rulepxl.h */
/*-->rulepxl*/
/**********************************************************************/
/****************************** rulepxl *******************************/
/**********************************************************************/

COORDINATE
rulepxl(number, cnvfac)/* return number of pixels in a rule */
register UNSIGN32 number;/* in DVI units	   */
register float cnvfac;	/* conversion factor */

{
    register COORDINATE n;

    n = (COORDINATE)(number*cnvfac);
    if ((float)n < ((float)(number))*cnvfac)
	return((COORDINATE)(n+1));
    else
	return((COORDINATE)n);
}