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 2.24 by greg, Tue Mar 30 14:39:29 1993 UTC vs.
Revision 2.27 by greg, Fri Jun 18 10:22:26 1993 UTC

# Line 624 | Line 624 | XKeyPressedEvent  *ekey;
624          case 't':                               /* trace */
625                  return(traceray(ekey->x, ekey->y));
626          case '=':                               /* adjust exposure */
627 +        case '@':                               /* adaptation level */
628                  if (avgbox(cval) == -1)
629                          return(-1);
630 <                n = log(.5/bright(cval))/.69315 - scale;        /* truncate */
630 >                comp = com=='@'
631 >                ? 106./pow(1.219+pow(luminance(cval)/exposure,.4),2.5)/exposure
632 >                : .5/bright(cval) ;
633 >                comp = log(comp)/.69315 - scale;
634 >                n = comp < 0 ? comp-.5 : comp+.5 ;      /* round */
635                  if (n == 0)
636                          return(0);
637                  scale_rcolors(ourras, pow(2.0, (double)n));
# Line 647 | Line 652 | XKeyPressedEvent  *ekey;
652                  if (fast)
653                          make_rpixmap(ourras, wind);
654                  redraw(0, 0, width, height);
655 +                return(0);
656 +        case 'f':                               /* turn on fast redraw */
657 +                fast = 1;
658 +                make_rpixmap(ourras, wind);
659 +                return(0);
660 +        case 'F':                               /* turn off fast redraw */
661 +                fast = 0;
662 +                free_rpixmap(ourras);
663                  return(0);
664          case '0':                               /* recenter origin */
665                  if (xoff == 0 & yoff == 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines