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.6 by greg, Tue Jan 9 09:08:09 1990 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines