165 |
|
/* free old image */ |
166 |
|
freepkids(&ptrunk); |
167 |
|
/* compute resolution */ |
168 |
< |
if (viewaspect(&ourview)*dev->xsiz > dev->pixaspect*dev->ysiz) { |
169 |
< |
vresolu = dev->ysiz; |
170 |
< |
hresolu = vresolu/viewaspect(&ourview)*dev->pixaspect; |
171 |
< |
} else { |
172 |
< |
hresolu = dev->xsiz; |
173 |
< |
vresolu = hresolu*viewaspect(&ourview)/dev->pixaspect; |
174 |
< |
} |
168 |
> |
hresolu = dev->xsiz; |
169 |
> |
vresolu = dev->ysiz; |
170 |
> |
normaspect(viewaspect(&ourview), &dev->pixaspect, &hresolu, &vresolu); |
171 |
|
pframe.l = pframe.d = 0; |
172 |
|
pframe.r = hresolu; pframe.u = vresolu; |
173 |
|
pdepth = 0; |
346 |
|
if ((err = setview(vp)) != NULL) { |
347 |
|
sprintf(errmsg, "view not set - %s", err); |
348 |
|
error(COMMAND, errmsg); |
349 |
< |
} else if (bcmp(vp, &ourview, sizeof(VIEW))) { |
350 |
< |
copyview(&oldview, &ourview); |
351 |
< |
copyview(&ourview, vp); |
349 |
> |
} else if (bcmp((char *)vp, (char *)&ourview, sizeof(VIEW))) { |
350 |
> |
copystruct(&oldview, &ourview); |
351 |
> |
copystruct(&ourview, vp); |
352 |
|
newimage(); /* newimage() calls with vp=&ourview! */ |
353 |
|
} |
354 |
|
} |