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

Comparing ray/src/px/pinterp.c (file contents):
Revision 1.17 by greg, Mon Jan 8 14:47:15 1990 UTC vs.
Revision 1.18 by greg, Tue Jan 9 11:39:17 1990 UTC

# Line 31 | Line 31 | struct position {int x,y; float z;};
31   VIEW    ourview = STDVIEW;              /* desired view */
32   int     hresolu = 512;                  /* horizontal resolution */
33   int     vresolu = 512;                  /* vertical resolution */
34 + double  pixaspect = 1.0;                /* pixel aspect ratio */
35  
36   double  zeps = .02;                     /* allowed z epsilon */
37  
# Line 138 | Line 139 | char   *argv[];
139                          check(2,1);
140                          vresolu = atoi(argv[++i]);
141                          break;
142 +                case 'p':                               /* pixel aspect */
143 +                        check(2,1);
144 +                        pixaspect = atof(argv[++i]);
145 +                        break;
146                  case 'v':                               /* view file */
147                          if (argv[i][2] != 'f')
148                                  goto badopt;
# Line 167 | Line 172 | char   *argv[];
172                  fprintf(stderr, "%s: %s\n", progname, err);
173                  exit(1);
174          }
175 +        normaspect(viewaspect(&ourview), &pixaspect, &hresolu, &vresolu);
176                                                  /* allocate frame */
177          ourpict = (COLR *)malloc(hresolu*vresolu*sizeof(COLR));
178          ourzbuf = (float *)calloc(hresolu*vresolu,sizeof(float));
# Line 189 | Line 195 | char   *argv[];
195                  fprintview(&ourview, stdout);
196                  printf("\n");
197          }
198 <        if (ourexp > 0 && ourexp != 1.0)
198 >        if (pixaspect < .99 || pixaspect > 1.01)
199 >                fputaspect(pixaspect, stdout);
200 >        if (ourexp > 0 && (ourexp < .995 || ourexp > 1.005))
201                  fputexpos(ourexp, stdout);
202          printf("\n");
203                                                          /* write picture */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines