? 01-xpdf-3.00pl1.patch ? 02-xpdf-3.00pl2.patch ? 03-xpdf-3.00pl3.patch ? 10-xpdf-3.01-docs.patch ? 11-xpdf-3.01-fixedpoint.patch ? 12-xpdf-3.01-no-no-decryption.patch ? 13-xpdf-3.01-goo-allocn.patch ? 14-xpdf-3.01-copyright-etc-updates.patch ? 15-xpdf-3.01-new-freetype.patch ? 16-xpdf-3.01-plugins.patch ? 17-xpdf-3.01-goo-improvements.patch ? 18-xpdf-3.01-configure-improvements.patch ? 19-xpdf-3.01-encrypt-metadata-flag.patch ? 20-xpdf-3.01-win32-no-unlink.patch ? 21-xpdf-3.01-win32-files-and-paths.patch ? 24-xpdf-3.01-splash-modified-region.patch ? poppler/patches ? splash/24-xpdf-3.01-splash-modified-region.patch Index: poppler/SplashOutputDev.h =================================================================== RCS file: /cvs/poppler/poppler/poppler/SplashOutputDev.h,v retrieving revision 1.2 diff -u -r1.2 SplashOutputDev.h --- poppler/SplashOutputDev.h 28 Jul 2005 17:34:19 -0000 1.2 +++ poppler/SplashOutputDev.h 15 Sep 2005 13:39:00 -0000 @@ -148,6 +148,11 @@ // is passed to Splash::setFillPattern, so it should not be used // after calling this function. void xorRectangle(int x0, int y0, int x1, int y1, SplashPattern *pattern); + // Get the modified region. + void getModRegion(int *xMin, int *yMin, int *xMax, int *yMax); + + // Clear the modified region. + void clearModRegion(); // Set the Splash fill color. void setFillColor(int r, int g, int b); Index: splash/Splash.cc =================================================================== RCS file: /cvs/poppler/poppler/splash/Splash.cc,v retrieving revision 1.2 diff -u -r1.2 Splash.cc --- splash/Splash.cc 22 Jul 2005 10:33:54 -0000 1.2 +++ splash/Splash.cc 15 Sep 2005 13:39:06 -0000 @@ -34,6 +34,7 @@ Splash::Splash(SplashBitmap *bitmapA) { bitmap = bitmapA; state = new SplashState(bitmap->width, bitmap->height); + clearModRegion(); debugMode = gFalse; } @@ -181,6 +182,36 @@ } //------------------------------------------------------------------------ +//------------------------------------------------------------------------ +// modified region +//------------------------------------------------------------------------ + +void Splash::clearModRegion() { + modXMin = bitmap->getWidth(); + modYMin = bitmap->getHeight(); + modXMax = -1; + modYMax = -1; +} + +inline void Splash::updateModX(int x) { + if (x < modXMin) { + modXMin = x; + } + if (x > modXMax) { + modXMax = x; + } +} + +inline void Splash::updateModY(int y) { + if (y < modYMin) { + modYMin = y; + } + if (y > modYMax) { + modYMax = y; + } +} + +//------------------------------------------------------------------------ // drawing operations //------------------------------------------------------------------------ Index: splash/Splash.h =================================================================== RCS file: /cvs/poppler/poppler/splash/Splash.h,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 Splash.h --- splash/Splash.h 3 Mar 2005 19:45:59 -0000 1.1.1.1 +++ splash/Splash.h 15 Sep 2005 13:39:07 -0000 @@ -148,11 +148,21 @@ // Return the associated bitmap. SplashBitmap *getBitmap() { return bitmap; } + // Get a bounding box which includes all modifications since the + // last call to clearModRegion. + void getModRegion(int *xMin, int *yMin, int *xMax, int *yMax) + { *xMin = modXMin; *yMin = modYMin; *xMax = modXMax; *yMax = modYMax; } + + // Clear the modified region bounding box. + void clearModRegion(); + // Toggle debug mode on or off. void setDebugMode(GBool debugModeA) { debugMode = debugModeA; } private: + void updateModX(int x); + void updateModY(int y); void strokeNarrow(SplashXPath *xPath); void strokeWide(SplashXPath *xPath); SplashXPath *makeDashedPath(SplashXPath *xPath); @@ -168,6 +178,7 @@ SplashBitmap *bitmap; SplashState *state; + int modXMin, modYMin, modXMax, modYMax; GBool debugMode; };