1 |
< |
/* Copyright (c) 1992 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1996 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
17 |
|
|
18 |
|
#include "color.h" |
19 |
|
|
20 |
+ |
#include "view.h" |
21 |
+ |
|
22 |
|
#include "resolu.h" |
23 |
|
|
24 |
|
#include "paths.h" |
66 |
|
|
67 |
|
int wrongformat = 0; |
68 |
|
|
69 |
+ |
VIEW ourview = STDVIEW; |
70 |
+ |
int gotview = 0; |
71 |
+ |
int wrapfilt = 0; /* wrap filter horizontally? */ |
72 |
+ |
|
73 |
|
int xrad; /* x search radius */ |
74 |
|
int yrad; /* y search radius */ |
75 |
|
int xbrad; /* x box size */ |
273 |
|
} |
274 |
|
if (!(order & YMAJOR)) |
275 |
|
inpaspect = 1.0/inpaspect; |
276 |
+ |
/* wrap around for cylindrical view? */ |
277 |
+ |
wrapfilt = gotview && ourview.type == VT_CYL && |
278 |
+ |
ourview.horiz >= 360.-FTINY && order & YMAJOR; |
279 |
|
/* compute output resolution */ |
280 |
|
if (ncols <= 0) |
281 |
|
ncols = x_c*xres + .5; |
348 |
|
ourbright = xyz_bright; |
349 |
|
else |
350 |
|
wrongformat = !globmatch(PICFMT, fmt); |
351 |
< |
} |
351 |
> |
} else if (isview(s) && sscanview(&ourview, s) > 0) |
352 |
> |
gotview++; |
353 |
|
} |
354 |
|
|
355 |
|
|
464 |
|
rad *= (y_r + x_c)/2.0; |
465 |
|
|
466 |
|
if (thresh > FTINY) { |
457 |
– |
xrad = CHECKRAD*THRESHRAD*rad/x_c + xbrad; |
458 |
– |
yrad = CHECKRAD*THRESHRAD*rad/y_r + ybrad; |
467 |
|
orad = CHECKRAD*THRESHRAD*rad + 1; |
468 |
+ |
xrad = orad/x_c + xbrad; |
469 |
+ |
yrad = orad/y_r + ybrad; |
470 |
|
obarsize = 2*orad + 1; |
471 |
|
} else { |
472 |
|
xrad = CHECKRAD*rad/x_c + 1; |
536 |
|
int ybot; |
537 |
|
register int c; |
538 |
|
/* average input scanlines */ |
539 |
< |
while (nextrow < r+orad && nextrow < nrows) { |
539 |
> |
while (nextrow <= r+orad && nextrow < nrows) { |
540 |
|
ybot = (long)nextrow*yres/nrows; |
541 |
|
for (c = 0; c < ncols; c++) { |
542 |
|
dobox(ctmp, (int)((long)c*xres/ncols),ybot, c,nextrow); |