X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpdf%2FGFXOutputDev.cc;h=ef441b4ccc1acbf9e28808bca5a2fc804b2dbb41;hb=44b96036f984be2cfdf899f1d6de94230cb4c922;hp=e0ade7fd85c20fa414d082abb9a612ca9a5da91c;hpb=22b33eac7235d597622d35cac61d48669ae85426;p=swftools.git diff --git a/lib/pdf/GFXOutputDev.cc b/lib/pdf/GFXOutputDev.cc index e0ade7f..ef441b4 100644 --- a/lib/pdf/GFXOutputDev.cc +++ b/lib/pdf/GFXOutputDev.cc @@ -575,6 +575,7 @@ GFXOutputDev::GFXOutputDev(InfoOutputDev*info, PDFDoc*doc) this->config_multiply = 1; this->gfxfontlist = gfxfontlist_create(); + this->dashPattern = 0; memset(states, 0, sizeof(states)); this->featurewarnings = 0; @@ -1090,6 +1091,8 @@ void GFXOutputDev::strokeGfxline(GfxState *state, gfxline_t*line, int flags) msg(" | phase: %f", this->dashStart); for(t=0;tdashLength;t++) { dash[t] = (float)this->dashPattern[t] * f; + if(!dash[t]) + dash[t] = 1e-37; msg(" | d%-3d: %f", t, this->dashPattern[t]); } dash[this->dashLength] = -1; @@ -2173,7 +2176,7 @@ void GFXOutputDev::drawGeneralImage(GfxState *state, Object *ref, Stream *str, imgStr = new ImageStream(str, width, ncomps,bits); imgStr->reset(); - if(!width || !height || (height<=1 && width<=1 && maskWidth<=1 && maskHeight<=1)) + if(!width || !height || ((height+width)<=1 && (maskWidth+maskHeight)<=1)) { msg(" Ignoring %d by %d image", width, height); unsigned char buf[8];