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.11 by gregl, Mon Dec 8 19:03:18 1997 UTC vs.
Revision 3.12 by gregl, Tue Dec 9 14:04:11 1997 UTC

# Line 204 | Line 204 | VIEW   *nv;
204          if (nv != &odev.v) {
205                  if (!FEQ(nv->horiz,odev.v.horiz) ||     /* resize window? */
206                                  !FEQ(nv->vert,odev.v.vert)) {
207 <                        odev.hres = 2.*VIEWDIST*tan(PI/180./2.*nv->horiz) /
208 <                                        pwidth;
209 <                        odev.vres = 2.*VIEWDIST*tan(PI/180./2.*nv->vert) /
210 <                                        pheight;
207 >                        odev.hres = 2.*VIEWDIST/pwidth *
208 >                                        tan(PI/180./2.*nv->horiz);
209 >                        odev.vres = 2.*VIEWDIST/pheight *
210 >                                        tan(PI/180./2.*nv->vert);
211                          XResizeWindow(ourdisplay, gwind, odev.hres, odev.vres);
212                  }
213                  copystruct(&odev.v, nv);
# Line 599 | Line 599 | register XConfigureEvent  *ersz;
599          if (ersz->width == odev.hres && ersz->height == odev.vres)
600                  return;
601  
602        if (odev.hres != 0 && odev.vres != 0) {
603                odev.v.horiz = 2.*180./PI * atan(0.5/VIEWDIST*pwidth*odev.hres);
604                odev.v.vert = 2.*180./PI * atan(0.5/VIEWDIST*pheight*odev.vres);
605                inpresflags |= DEV_NEWVIEW;
606        }
602          odev.hres = ersz->width;
603          odev.vres = ersz->height;
604  
605 <        inpresflags |= DEV_NEWSIZE;
605 >        odev.v.horiz = 2.*180./PI * atan(0.5/VIEWDIST*pwidth*odev.hres);
606 >        odev.v.vert = 2.*180./PI * atan(0.5/VIEWDIST*pheight*odev.vres);
607 >
608 >        inpresflags |= DEV_NEWSIZE|DEV_NEWVIEW;
609   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines