ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/image.c
(Generate patch)

Comparing ray/src/common/image.c (file contents):
Revision 1.5 by greg, Mon Jan 8 14:45:52 1990 UTC vs.
Revision 1.7 by greg, Tue Jan 9 11:37:50 1990 UTC

# Line 65 | Line 65 | register VIEW  *v;
65   }
66  
67  
68 + normaspect(va, ap, xp, yp)              /* fix pixel aspect or resolution */
69 + double  va;                     /* view aspect ratio */
70 + double  *ap;                    /* pixel aspect in (or out if 0) */
71 + int  *xp, *yp;                  /* x and y resolution in (or out if *ap!=0) */
72 + {
73 +        if (*ap <= FTINY)
74 +                *ap = va * *xp / *yp;           /* compute pixel aspect */
75 +        else if (va * *xp > *ap * *yp)
76 +                *xp = *yp / va * *ap;           /* reduce x resolution */
77 +        else
78 +                *yp = *xp * va / *ap;           /* reduce y resolution */
79 + }
80 +
81 +
82   viewray(orig, direc, v, x, y)           /* compute ray origin and direction */
83   FVECT  orig, direc;
84   register VIEW  *v;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines