diff --git "a/C:\\Users\\JULIUS~1\\AppData\\Local\\Temp\\TortoiseGit\\SplAC95.tmp\\SplashOutputDev-f536a4e-left.cc" "b/H:\\poppler\\poppler\\SplashOutputDev.cc" index 171825f..cbb0d02 100644 --- "a/C:\\Users\\JULIUS~1\\AppData\\Local\\Temp\\TortoiseGit\\SplAC95.tmp\\SplashOutputDev-f536a4e-left.cc" +++ "b/H:\\poppler\\poppler\\SplashOutputDev.cc" @@ -4171,7 +4171,7 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *ca repeatX = x1 - x0; repeatY = y1 - y0; } else { - if ((unsigned long) result_width * result_height > 0x800000L) { + if ((unsigned long) surface_width * surface_height > 0x800000L) { state->setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], savedCTM[4], savedCTM[5]); return gFalse; } @@ -4237,6 +4237,7 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *ca gfx->getState()->setCTM(m1.m[0], m1.m[1], m1.m[2], m1.m[3], m1.m[4], m1.m[5]); updateCTM(gfx->getState(), m1.m[0], m1.m[1], m1.m[2], m1.m[3], m1.m[4], m1.m[5]); gfx->display(str); + delete splash; splash = formerSplash; TilingSplashOutBitmap imgData; imgData.bitmap = bitmap; @@ -4266,7 +4267,21 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *ca matc[1] = ctm[1]; matc[2] = ctm[2]; matc[3] = ctm[3]; - retValue = splash->drawImage(&tilingBitmapSrc, &imgData, colorMode, gTrue, result_width, result_height, matc, gTrue) == splashOk; + //retValue = splash->drawImage(&tilingBitmapSrc, &imgData, colorMode, gTrue, result_width, result_height, matc, gTrue) == splashOk; + GBool minorAxisZero = matc[1] ==0 && matc[2] == 0; + if(matc[0] > 0 && minorAxisZero && matc[3] > 0) { + // draw the tiles + for (int y = 0; y < imgData.repeatY; ++y) { + for (int x = 0; x < imgData.repeatX; ++x) { + x0 = splashFloor(matc[4]) + x * tBitmap->getWidth(); + y0 = splashFloor(matc[5]) + y * tBitmap->getHeight(); + splash->blitImage(tBitmap, gTrue, x0, y0); + } + } + retValue = gTrue; + } else { + retValue = splash->drawImage(&tilingBitmapSrc, &imgData, colorMode, gTrue, result_width, result_height, matc, gFalse, gTrue) == splashOk; + } delete tBitmap; delete gfx; return retValue;