X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=pdf2swf%2FSWFOutputDev.cc;h=a03807637422dacc887a05986466af0f840b71dc;hb=ca2c2fd23adb5aadc0a40c2469f7855fbf1dd440;hp=8e8c1f7a0dba822a72e9a886882570bbe6264d3f;hpb=4bfcb7ae5fe91167cfce574142c7acd100745459;p=swftools.git diff --git a/pdf2swf/SWFOutputDev.cc b/pdf2swf/SWFOutputDev.cc index 8e8c1f7..a038076 100644 --- a/pdf2swf/SWFOutputDev.cc +++ b/pdf2swf/SWFOutputDev.cc @@ -157,6 +157,9 @@ public: // Does this device use drawChar() or drawString()? virtual GBool useDrawChar(); + // Can this device draw gradients? + virtual GBool useGradients(); + virtual GBool interpretType3Chars() {return gTrue;} //----- initialization and control @@ -238,6 +241,7 @@ public: int pbminfo; // did we write "File contains jpegs" yet? int linkinfo; // did we write "File contains links" yet? int ttfinfo; // did we write "File contains TrueType Fonts" yet? + int gradientinfo; // did we write "File contains Gradients yet? int type3active; // are we between beginType3()/endType3()? @@ -648,6 +652,15 @@ GBool SWFOutputDev::useDrawChar() { return gTrue; } +GBool SWFOutputDev::useGradients() +{ + if(!gradientinfo) + { + msg(" File contains gradients"); + gradientinfo = 1; + } + return gTrue; +} void SWFOutputDev::beginString(GfxState *state, GString *s) { @@ -680,9 +693,9 @@ void SWFOutputDev::drawChar(GfxState *state, double x, double y, state->transform(x, y, &x1, &y1); Unicode u=0; - if(_u) + if(_u && uLen) u = *_u; - + /* find out the character name */ char*name=0; if(font->isCIDFont() && u) {