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

Comparing ray/src/px/pfilt.c (file contents):
Revision 2.18 by greg, Wed May 22 10:42:08 1996 UTC vs.
Revision 2.20 by gwlarson, Tue Oct 27 09:08:26 1998 UTC

# Line 332 | Line 332 | COLOR  clr;
332   double  (*ourbright)() = rgb_bright;
333  
334  
335 + int
336   headline(s)                             /* process line from header */
337   char  *s;
338   {
# Line 352 | Line 353 | char  *s;
353                          wrongformat = !globmatch(PICFMT, fmt);
354          } else if (isview(s) && sscanview(&ourview, s) > 0)
355                  gotview++;
356 +        return(0);
357   }
358  
359  
# Line 414 | Line 416 | FILE  *in;
416          scan2init();
417          yread = 0;
418          for (r = 0; r < nrows; r++) {
419 <                ycent = (long)r*yres/nrows;
419 >                ycent = (r+.5)*yres/nrows;
420                  while (yread <= ycent+yrad) {
421                          if (yread < yres) {
422                                  if (freadscan(scanin[yread%barsize],
# Line 431 | Line 433 | FILE  *in;
433                  if (obarsize > 0)
434                          scan2sync(r);
435                  for (c = 0; c < ncols; c++) {
436 <                        xcent = (long)c*xres/ncols;
436 >                        xcent = (c+.5)*xres/ncols;
437                          if (thresh > FTINY)
438                                  dothresh(xcent, ycent, c, r);
439                          else if (rad > FTINY)
# Line 540 | Line 542 | int  r;
542          register int  c;
543                                          /* average input scanlines */
544          while (nextrow <= r+orad && nextrow < nrows) {
545 <                ybot = (long)nextrow*yres/nrows;
545 >                ybot = (nextrow+.5)*yres/nrows;
546                  for (c = 0; c < ncols; c++) {
547 <                        dobox(ctmp, (int)((long)c*xres/ncols),ybot, c,nextrow);
547 >                        dobox(ctmp, (int)((c+.5)*xres/ncols),ybot, c,nextrow);
548                          greybar[nextrow%obarsize][c] = (*ourbright)(ctmp);
549                  }
550                                          /* and zero output scanline */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines