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

Comparing ray/src/px/ximage.c (file contents):
Revision 1.20 by greg, Fri Jan 5 17:52:57 1990 UTC vs.
Revision 1.21 by greg, Mon Jan 8 14:47:11 1990 UTC

# Line 58 | Line 58 | int  scale = 0;                                /* scalefactor; power of two */
58   int  xoff = 0;                          /* x image offset */
59   int  yoff = 0;                          /* y image offset */
60  
61 < VIEW  ourview = STDVIEW(0);             /* image view parameters */
61 > VIEW  ourview = STDVIEW;                /* image view parameters */
62   int  gotview = 0;                       /* got parameters from file */
63  
64   COLR  *scanline;                        /* scan line buffer */
# Line 146 | Line 146 | char  *argv[];
146          if (fgetresolu(&xmax, &ymax, fin) != (YMAJOR|YDECR))
147                  quiterr("bad picture size");
148                                  /* set view parameters */
149 <        if (gotview) {
150 <                ourview.hresolu = xmax;
151 <                ourview.vresolu = ymax;
152 <                if (setview(&ourview) != NULL)
153 <                        gotview = 0;
154 <        }
149 >        if (gotview && setview(&ourview) != NULL)
150 >                gotview = 0;
151          if ((scanline = (COLR *)malloc(xmax*sizeof(COLR))) == NULL)
152                  quiterr("out of memory");
153  
# Line 178 | Line 174 | char  *s;
174          else
175                  for (an = altname; *an != NULL; an++)
176                          if (!strncmp(*an, s, strlen(*an))) {
177 <                                if (sscanview(&ourview, s+strlen(*an)) == 0)
177 >                                if (sscanview(&ourview, s+strlen(*an)) > 0)
178                                          gotview++;
179                                  return;
180                          }
# Line 411 | Line 407 | XKeyEvent  *ekey;
407                          XFeep(0);
408                          return(-1);
409                  }
410 <                rayview(rorg, rdir, &ourview,
411 <                                ekey->x-xoff + .5, ymax-1-ekey->y+yoff + .5);
410 >                viewray(rorg, rdir, &ourview, (ekey->x-xoff+.5)/xmax,
411 >                                (ymax-1-ekey->y+yoff+.5)/ymax);
412                  printf("%e %e %e ", rorg[0], rorg[1], rorg[2]);
413                  printf("%e %e %e\n", rdir[0], rdir[1], rdir[2]);
414                  fflush(stdout);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines