if we're inside a transparency group, draw glyphs on bitmap
[swftools.git] / lib / pdf / BitmapOutputDev.cc
index ff6d50e..6ed165d 100644 (file)
@@ -1243,13 +1243,18 @@ void BitmapOutputDev::drawChar(GfxState *state, double x, double y,
     msg("<debug> drawChar render=%d", state->getRender());
 
     if(state->getRender()&RENDER_CLIP) {
+       //char is just a clipping boundary
        rgbdev->drawChar(state, x, y, dx, dy, originX, originY, code, nBytes, u, uLen);
-        
-        /* FIXME: do we need these calls? */
         boolpolydev->drawChar(state, x, y, dx, dy, originX, originY, code, nBytes, u, uLen);
         booltextdev->drawChar(state, x, y, dx, dy, originX, originY, code, nBytes, u, uLen);
         clip1dev->drawChar(state, x, y, dx, dy, originX, originY, code, nBytes, u, uLen);
+    } else if(rgbbitmap != rgbdev->getBitmap()) {
+       // we're doing softmasking or transparency grouping
+       boolpolydev->drawChar(state, x, y, dx, dy, originX, originY, code, nBytes, u, uLen);
+       checkNewBitmap(UNKNOWN_BOUNDING_BOX);
+       rgbdev->drawChar(state, x, y, dx, dy, originX, originY, code, nBytes, u, uLen);
     } else {
+       // we're drawing a regular char
        clearClips();
        clip0dev->drawChar(state, x, y, dx, dy, originX, originY, code, nBytes, u, uLen);
        clip1dev->drawChar(state, x, y, dx, dy, originX, originY, code, nBytes, u, uLen);