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

Comparing ray/src/rt/rpict.c (file contents):
Revision 1.30 by greg, Thu Jul 18 14:42:54 1991 UTC vs.
Revision 1.31 by greg, Tue Aug 13 12:16:34 1991 UTC

# Line 354 | Line 354 | int  x, y;                     /* pixel position */
354  
355          rayorigin(&thisray, NULL, PRIMARY, 1.0);
356  
357 <        samplendx = 3*y + x;                    /* set pixel index */
357 >        samplendx = pixnumber(x,y,hresolu,vresolu);     /* set pixel index */
358  
359          rayvalue(&thisray);                     /* trace ray */
360  
# Line 413 | Line 413 | char  *oldfile;
413          return(y);
414   writerr:
415          error(SYSTEM, "write error in salvage");
416 + }
417 +
418 +
419 + int
420 + pixnumber(x, y, xres, yres)             /* compute pixel index (brushed) */
421 + register int  x, y;
422 + int  xres, yres;
423 + {
424 +        x -= y;
425 +        while (x < 0)
426 +                x += xres;
427 +        return((((x>>2)*yres + y) << 2) + (x & 3));
428   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines