* removed useGradients() method
[swftools.git] / pdf2swf / SWFOutputDev.cc
index b447a7e..0eac335 100644 (file)
@@ -48,8 +48,8 @@
 #include "Error.h"
 #include "Link.h"
 #include "OutputDev.h"
-#include "GfxState.h"
 #include "GfxFont.h"
+#include "GfxState.h"
 #include "CharCodeToUnicode.h"
 #include "NameToUnicodeTable.h"
 #include "GlobalParams.h"
@@ -169,10 +169,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;}
+  
+  //virtual GBool useShadedFills() { return gTrue; }
 
   //----- initialization and control
 
@@ -385,7 +384,6 @@ class InfoOutputDev:  public OutputDev
   }
   virtual GBool upsideDown() {return gTrue;}
   virtual GBool useDrawChar() {return gTrue;}
-  virtual GBool useGradients() {return gTrue;}
   virtual GBool interpretType3Chars() {return gTrue;}
   virtual void startPage(int pageNum, GfxState *state, double crop_x1, double crop_y1, double crop_x2, double crop_y2)
   {
@@ -1056,15 +1054,6 @@ GBool SWFOutputDev::useDrawChar()
 {
     return gTrue;
 }
-GBool SWFOutputDev::useGradients()
-{
-    if(!gradientinfo)
-    {
-       msg("<notice> File contains gradients");
-       gradientinfo = 1;
-    }
-    return gTrue;
-}
 
 char*renderModeDesc[]= {"fill", "stroke", "fill+stroke", "invisible",
                       "clip+fill", "stroke+clip", "fill+stroke+clip", "clip"};
@@ -1226,6 +1215,9 @@ void SWFOutputDev::drawChar(GfxState *state, double x, double y,
     Unicode u=0;
     char*name=0;
 
+    if(uLen)
+       u = _u[0];
+
     if(font->isCIDFont()) {
        GfxCIDFont*cfont = (GfxCIDFont*)font;
 
@@ -2271,7 +2263,7 @@ void SWFOutputDev::drawGeneralImage(GfxState *state, Object *ref, Stream *str,
     ncomps = colorMap->getNumPixelComps();
     bits = colorMap->getBits();
   }
-  
+      
   if(maskStr) {
       int x,y;
       unsigned char buf[8];
@@ -2307,8 +2299,9 @@ void SWFOutputDev::drawGeneralImage(GfxState *state, Object *ref, Stream *str,
          }
          delete imgMaskStr;
       }
+      maskStr->close();
   }
-      
+  
   imgStr = new ImageStream(str, width, ncomps,bits);
   imgStr->reset();
 
@@ -2332,6 +2325,7 @@ void SWFOutputDev::drawGeneralImage(GfxState *state, Object *ref, Stream *str,
   state->transform(1, 0, &x3, &y3); x3 += user_movex; y3 += user_movey;
   state->transform(1, 1, &x4, &y4); x4 += user_movex; y4 += user_movey;
 
+
   if(!pbminfo && !(str->getKind()==strDCT)) {
       if(!type3active) {
          msg("<notice> file contains pbm pictures %s",mask?"(masked)":"");