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.3 by greg, Fri Mar 2 12:22:37 1990 UTC vs.
Revision 1.4 by greg, Fri Mar 2 14:58:57 1990 UTC

# Line 194 | Line 194 | char  *s;
194  
195   init()                  /* get data and open window */
196   {
197 +        XSetWindowAttributes    ourwinattr;
198          XSizeHints  oursizhints;
199          register int  i;
200          
# Line 206 | Line 207 | init()                 /* get data and open window */
207          }
208          if ((thedisplay = XOpenDisplay(NULL)) == NULL)
209                  quiterr("can't open display; DISPLAY variable set?");
209        wind = XCreateSimpleWindow(thedisplay,
210                ourroot, 0, 0, xmax, ymax, BORWIDTH, ourblack, ourwhite);
211        if (wind == 0)
212                quiterr("can't create window");
210          if (maxcolors == 0) {           /* get number of available colors */
211                  i = DisplayPlanes(thedisplay,ourscreen);
212                  maxcolors = i > 8 ? 256 : 1<<i;
213                  if (maxcolors > 4) maxcolors -= 2;
214          }
215 +                                /* store image */
216 +        getras();
217 +                                /* open window */
218 +        ourwinattr.border_pixel = ourblack;
219 +        ourwinattr.background_pixel = ourwhite;
220 +        wind = XCreateWindow(thedisplay, ourroot, 0, 0, xmax, ymax, BORWIDTH,
221 +                        0, InputOutput, ourras->visual,
222 +                        CWBackPixel|CWBorderPixel, &ourwinattr);
223 +        if (wind == 0)
224 +                quiterr("can't create window");
225          fontid = XLoadFont(thedisplay, FONTNAME);
226          if (fontid == 0)
227                  quiterr("can't get font");
# Line 244 | Line 251 | init()                 /* get data and open window */
251                  }
252                  XSetNormalHints(thedisplay, wind, &oursizhints);
253          }
247                                /* store image */
248        getras();
254          XSelectInput(thedisplay, wind, ButtonPressMask|ButtonReleaseMask
255                          |ButtonMotionMask|StructureNotifyMask
256                          |KeyPressMask|ExposureMask);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines