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

Comparing ray/src/hd/rhd_x11.c (file contents):
Revision 3.17 by gregl, Fri Dec 19 14:44:58 1997 UTC vs.
Revision 3.18 by gregl, Wed Dec 24 14:04:22 1997 UTC

# Line 158 | Line 158 | char  *id;
158          oursizhints.min_height = MINHEIGHT;
159          oursizhints.flags = PMinSize;
160          XSetNormalHints(ourdisplay, gwind, &oursizhints);
161 +                                        /* figure out sensible view */
162 +        pwidth = (double)DisplayWidthMM(ourdisplay, ourscreen) /
163 +                        DisplayWidth(ourdisplay, ourscreen);
164 +        pheight = (double)DisplayHeightMM(ourdisplay, ourscreen) /
165 +                        DisplayHeight(ourdisplay, ourscreen);
166 +        copystruct(&odev.v, &stdview);
167 +        odev.v.type = VT_PER;
168                                          /* map the window and get its size */
169          XMapWindow(ourdisplay, gwind);
170 <        dev_input();
170 >        dev_input();                    /* sets size and view angles */
171                                          /* allocate our leaf pile */
172          if (!qtAllocLeaves(DisplayWidth(ourdisplay,ourscreen) *
173                          DisplayHeight(ourdisplay,ourscreen) /
174                          (qtMinNodesiz*qtMinNodesiz)))
175                  error(SYSTEM, "insufficient memory for leaf storage");
169
170                                        /* figure out sensible view */
171        pwidth = (double)DisplayWidthMM(ourdisplay, ourscreen) /
172                        DisplayWidth(ourdisplay, ourscreen);
173        pheight = (double)DisplayHeightMM(ourdisplay, ourscreen) /
174                        DisplayHeight(ourdisplay, ourscreen);
175        copystruct(&odev.v, &stdview);
176          odev.name = id;
177        odev.v.type = VT_PER;
178        odev.v.horiz = 2.*180./PI * atan(0.5/VIEWDIST*pwidth*odev.hres);
179        odev.v.vert = 2.*180./PI * atan(0.5/VIEWDIST*pheight*odev.vres);
177          odev.ifd = ConnectionNumber(ourdisplay);
178   }
179  
# Line 236 | Line 233 | VIEW   *nv;
233                                  odev.vres = dh;
234                          }
235                          XResizeWindow(ourdisplay, gwind, odev.hres, odev.vres);
236 +                        dev_input();    /* wait for resize event */
237                  }
238                  copystruct(&odev.v, nv);
239          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines