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

Comparing ray/src/px/x11image.c (file contents):
Revision 1.24 by greg, Thu May 23 12:00:38 1991 UTC vs.
Revision 1.25 by greg, Mon Aug 26 10:15:01 1991 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1990 Regents of the University of California */
1 > /* Copyright (c) 1991 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 580 | Line 580 | int  x0, y0, x1, y1;
580   avgbox(clr)                             /* average color over current box */
581   COLOR  clr;
582   {
583 +        static COLOR  lc;
584 +        static int  ll, lr, lt, lb;
585          int  left, right, top, bottom;
586          int  y;
587          double  d;
# Line 603 | Line 605 | COLOR  clr;
605                  bottom = ymax;
606          if (top >= bottom)
607                  return(-1);
608 +        if (left == ll && right == lr && top == lt && bottom == lb) {
609 +                copycolor(clr, lc);
610 +                return;
611 +        }
612          for (y = top; y < bottom; y++) {
613                  if (getscan(y) == -1)
614                          return(-1);
# Line 613 | Line 619 | COLOR  clr;
619          }
620          d = 1.0/((right-left)*(bottom-top));
621          scalecolor(clr, d);
622 +        ll = left; lr = right; lt = top; lb = bottom;
623 +        copycolor(lc, clr);
624          return(0);
625   }
626  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines