X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpdf%2FGFXOutputDev.cc;h=df27a23e015af311953ee1453a9d1c5f2d00e656;hb=f53b3156fe0f6913b1ae20038041e66777291ad1;hp=ed07c181ac7938f1648a1071a818b93223eb5f3c;hpb=3051901f56742d21be265680e7948a5e7cbaf7ce;p=swftools.git diff --git a/lib/pdf/GFXOutputDev.cc b/lib/pdf/GFXOutputDev.cc index ed07c18..df27a23 100644 --- a/lib/pdf/GFXOutputDev.cc +++ b/lib/pdf/GFXOutputDev.cc @@ -273,6 +273,7 @@ GFXOutputDev::GFXOutputDev(parameter_t*p) this->config_use_fontconfig=1; this->config_break_on_warning=0; this->config_remapunicode=0; + this->config_transparent=0; this->do_interpretType3Chars = gTrue; this->parameters = p; @@ -296,8 +297,8 @@ void GFXOutputDev::setParameter(const char*key, const char*value) this->config_use_fontconfig = atoi(value); } else if(!strcmp(key,"remapunicode")) { this->config_remapunicode = atoi(value); - } else { - msg(" Ignored parameter: %s=%s", key, value); + } else if(!strcmp(key,"transparent")) { + this->config_transparent = atoi(value); } } @@ -726,8 +727,6 @@ void GFXOutputDev::strokeGfxline(GfxState *state, gfxline_t*line, int flags) if(dashnum && ldash) { float * dash = (float*)malloc(sizeof(float)*(dashnum+1)); int t; - double cut = 0; - int fixzero = 0; msg(" %d dashes", dashnum); msg(" | phase: %f", dashphase); for(t=0;t= LOGLEVEL_TRACE) { + dump_outline(gfxline); + } + if(!gfxline) { + msg(" Empty polygon (resulting from stroked line)"); + } if(flags&STROKE_CLIP) { device->startclip(device, gfxline); states[statepos].clipping++; @@ -838,6 +843,12 @@ void GFXOutputDev::clipToStrokePath(GfxState *state) { GfxPath * path = state->getPath(); gfxline_t*line= gfxPath_to_gfxline(state, path, 0, user_movex + clipmovex, user_movey + clipmovey); + + if(getLogLevel() >= LOGLEVEL_TRACE) { + msg(" cliptostrokepath\n"); + dump_outline(line); + } + strokeGfxline(state, line, STROKE_FILL|STROKE_CLIP); gfxline_free(line); } @@ -1320,7 +1331,8 @@ void GFXOutputDev::startPage(int pageNum, GfxState *state, double crop_x1, doubl clippath[3].type = gfx_lineTo;clippath[3].x = x1; clippath[3].y = y2; clippath[3].next = &clippath[4]; clippath[4].type = gfx_lineTo;clippath[4].x = x1; clippath[4].y = y1; clippath[4].next = 0; device->startclip(device, clippath); outer_clip_box = 1; - device->fill(device, clippath, &white); + if(!config_transparent) + device->fill(device, clippath, &white); }