static int dbgindent = 0;
static void dbg(char*format, ...)
{
static int dbgindent = 0;
static void dbg(char*format, ...)
{
void GFXOutputDev::beginTransparencyGroup(GfxState *state, double *bbox,
GfxColorSpace *blendingColorSpace,
GBool isolated, GBool knockout,
void GFXOutputDev::beginTransparencyGroup(GfxState *state, double *bbox,
GfxColorSpace *blendingColorSpace,
GBool isolated, GBool knockout,
dbg("beginTransparencyGroup %.1f/%.1f/%.1f/%.1f %s isolated=%d knockout=%d forsoftmask=%d", bbox[0],bbox[1],bbox[2],bbox[3], colormodename, isolated, knockout, forSoftMask);
dbg("using clipping rect %f/%f/%f/%f\n", rect.posx,rect.posy,rect.width,rect.height);
msg("<verbose> beginTransparencyGroup %.1f/%.1f/%.1f/%.1f %s isolated=%d knockout=%d forsoftmask=%d", bbox[0],bbox[1],bbox[2],bbox[3], colormodename, isolated, knockout, forSoftMask);
dbg("beginTransparencyGroup %.1f/%.1f/%.1f/%.1f %s isolated=%d knockout=%d forsoftmask=%d", bbox[0],bbox[1],bbox[2],bbox[3], colormodename, isolated, knockout, forSoftMask);
dbg("using clipping rect %f/%f/%f/%f\n", rect.posx,rect.posy,rect.width,rect.height);
msg("<verbose> beginTransparencyGroup %.1f/%.1f/%.1f/%.1f %s isolated=%d knockout=%d forsoftmask=%d", bbox[0],bbox[1],bbox[2],bbox[3], colormodename, isolated, knockout, forSoftMask);
dbg("softmaskrecording is %08x at statepos %d\n", states[statepos].softmaskrecording, statepos);
states[statepos].softmask = 1;
dbg("softmaskrecording is %08x at statepos %d\n", states[statepos].softmaskrecording, statepos);
states[statepos].softmask = 1;
- belowrender.setparameter(&belowrender, "fillwhite", "1"); //for isolated=0?
+ if(states[statepos+1].isolated) {
+ belowrender.setparameter(&belowrender, "fillwhite", "1");
+ }
belowrender.setparameter(&belowrender, "antialize", "2");
belowrender.startpage(&belowrender, width, height);
gfxresult_record_replay(below, &belowrender);
belowrender.endpage(&belowrender);
gfxresult_t* belowresult = belowrender.finish(&belowrender);
gfximage_t* belowimg = (gfximage_t*)belowresult->get(belowresult,"page0");
belowrender.setparameter(&belowrender, "antialize", "2");
belowrender.startpage(&belowrender, width, height);
gfxresult_record_replay(below, &belowrender);
belowrender.endpage(&belowrender);
gfxresult_t* belowresult = belowrender.finish(&belowrender);
gfximage_t* belowimg = (gfximage_t*)belowresult->get(belowresult,"page0");
gfxcolor_t* l1 = &maskimg->data[maskimg->width*y];
gfxcolor_t* l2 = &belowimg->data[belowimg->width*y];
for(x=0;x<width;x++) {
gfxcolor_t* l1 = &maskimg->data[maskimg->width*y];
gfxcolor_t* l2 = &belowimg->data[belowimg->width*y];
for(x=0;x<width;x++) {
- l2->r = div255(l2->a*l2->r);
- l2->g = div255(l2->a*l2->g);
- l2->b = div255(l2->a*l2->b);
+ l2->a = div255(alpha*l2->a);
+ l2->r = div255(alpha*l2->r);
+ l2->g = div255(alpha*l2->g);
+ l2->b = div255(alpha*l2->b);