X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpdf%2FBitmapOutputDev.cc;h=4b2a33432f8d667cc03de63c91f866ac9188a142;hb=7ff0a634c656a09f58162ddc57795e30400cdde9;hp=ff6d50e1a72ec98456b71c073a68a7d01a3ceaea;hpb=d9edc98b73bbea0612f27d008866608d8baaeed1;p=swftools.git diff --git a/lib/pdf/BitmapOutputDev.cc b/lib/pdf/BitmapOutputDev.cc index ff6d50e..4b2a334 100644 --- a/lib/pdf/BitmapOutputDev.cc +++ b/lib/pdf/BitmapOutputDev.cc @@ -269,6 +269,8 @@ void BitmapOutputDev::flushBitmap() m.ty = ymin; m.m00 = m.m11 = 1; m.m10 = m.m01 = 0; + m.tx -= 0.5; + m.ty -= 0.5; gfxline_t* line = gfxline_makerectangle(xmin, ymin, xmax, ymax); dev->fillbitmap(dev, line, img, &m, 0); @@ -1243,13 +1245,18 @@ void BitmapOutputDev::drawChar(GfxState *state, double x, double y, msg(" 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);