366 |
|
int nsv, npv; |
367 |
|
int xmin, xmax, ymin, ymax, x, y; |
368 |
|
FLOAT cxy[2]; |
369 |
< |
double pa; |
369 |
> |
double w; |
370 |
|
RAY sr; |
371 |
|
register SPLIST *sp; |
372 |
|
register int i; |
415 |
|
continue; /* missed/blocked */ |
416 |
|
/* modify pixel */ |
417 |
|
if (zbf[y-y0] != NULL && |
418 |
< |
sr.rt < zbf[y-y0][x-x0]) |
418 |
> |
sr.rt < 0.999*zbf[y-y0][x-x0]) |
419 |
|
zbf[y-y0][x-x0] = sr.rt; |
420 |
< |
pa = poly_area(ppoly, npv); |
421 |
< |
scalecolor(sr.rcol, pa*hres*vres); |
422 |
< |
scalecolor(pic[y-y0][x-x0], (1.-pa*hres*vres)); |
420 |
> |
else if (!bigdiff(sr.rcol, pic[y-y0][x-x0], |
421 |
> |
0.001)) /* source sample */ |
422 |
> |
setcolor(pic[y-y0][x-x0], 0., 0., 0.); |
423 |
> |
w = poly_area(ppoly, npv) * hres * vres; |
424 |
> |
scalecolor(sr.rcol, w); |
425 |
> |
scalecolor(pic[y-y0][x-x0], 1.-w); |
426 |
|
addcolor(pic[y-y0][x-x0], sr.rcol); |
427 |
|
} |
428 |
|
} |