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.8 by greg, Fri May 29 14:21:12 1992 UTC vs.
Revision 2.9 by greg, Sat May 30 09:33:01 1992 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1991 Regents of the University of California */
1 > /* Copyright (c) 1992 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 55 | Line 55 | int  fast = 0;                         /* keep picture in Pixmap? */
55   char    *dispname = NULL;               /* our display name */
56  
57   Window  wind = 0;                       /* our output window */
58 < unsigned long  ourblack=1, ourwhite=0;  /* black and white for this visual */
58 > unsigned long  ourblack=0, ourwhite=1;  /* black and white for this visual */
59   Font  fontid;                           /* our font */
60  
61   int  maxcolors = 0;                     /* maximum colors */
# Line 240 | Line 240 | init()                 /* get data and open window */
240                          CWBackPixel|CWBorderPixel|CWColormap, &ourwinattr);
241          if (wind == 0)
242                  quiterr("cannot create window");
243 +        XFreeColormap(thedisplay, ourwinattr.colormap);
244          width = xmax;
245          height = ymax;
246          ourgc = XCreateGC(thedisplay, wind, 0, 0);
# Line 427 | Line 428 | static char  vistype[][12] = {
428          } else if (ourvis.class == PseudoColor) {
429                  ourblack = BlackPixel(thedisplay,ourscreen);
430                  ourwhite = WhitePixel(thedisplay,ourscreen);
431 +                if ((ourblack|ourwhite) & ~255L) {
432 +                        ourblack = 0;
433 +                        ourwhite = 1;
434 +                }
435          } else {
436                  ourblack = 0;
437 <                ourwhite = ~0;
437 >                ourwhite = ourvis.red_mask|ourvis.green_mask|ourvis.blue_mask;
438          }
439          XFree((char *)xvi);
440   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines