summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2012-01-10 23:26:45 +0100
committerAlbert Astals Cid <aacid@kde.org>2012-01-10 23:26:45 +0100
commitddc9703d76b2d07674b61c74246db00aac3eb319 (patch)
treef32c808bc129f8289b6767af571fde7eb376bf6f
parent0666d0a46fb65ac1bd56dd345e2ce47bcb51b5c6 (diff)
[xpdf303] More Splash.cc merges from Thomas
-rw-r--r--ALL_DIFF125
1 files changed, 0 insertions, 125 deletions
diff --git a/ALL_DIFF b/ALL_DIFF
index afe4e00..385d9a2 100644
--- a/ALL_DIFF
+++ b/ALL_DIFF
@@ -15,66 +15,6 @@ diff -ru xpdf-3.02/doc/pdftotext.1 xpdf-3.03/doc/pdftotext.1
diff -ru xpdf-3.02/splash/Splash.cc xpdf-3.03/splash/Splash.cc
--- xpdf-3.02/splash/Splash.cc 2007-02-27 23:05:52.000000000 +0100
+++ xpdf-3.03/splash/Splash.cc 2011-08-15 23:08:53.000000000 +0200
-@@ -38,6 +41,52 @@
- // Clip x to lie in [0, 255].
- static inline Guchar clip255(int x) {
- return x < 0 ? 0 : x > 255 ? 255 : x;
- }
-+
-+// The PDF spec says that all pixels whose *centers* lie within the
-+// image target region get painted, so we want to round n+0.5 down to
-+// n. But this causes problems, e.g., with PDF files that fill a
-+// rectangle with black and then draw an image to the exact same
-+// rectangle, so we instead use the fill scan conversion rule.
-+// However, the correct rule works better for glyphs, so we also
-+// provide that option in fillImageMask.
-+#if 0
-+static inline int imgCoordMungeLower(SplashCoord x) {
-+ return splashCeil(x + 0.5) - 1;
-+}
-+static inline int imgCoordMungeUpper(SplashCoord x) {
-+ return splashCeil(x + 0.5) - 1;
-+}
-+#else
-+static inline int imgCoordMungeLower(SplashCoord x) {
-+ return splashFloor(x);
-+}
-+static inline int imgCoordMungeUpper(SplashCoord x) {
-+ return splashFloor(x) + 1;
-+}
-+static inline int imgCoordMungeLowerC(SplashCoord x, GBool glyphMode) {
-+ return glyphMode ? (splashCeil(x + 0.5) - 1) : splashFloor(x);
-+}
-+static inline int imgCoordMungeUpperC(SplashCoord x, GBool glyphMode) {
-+ return glyphMode ? (splashCeil(x + 0.5) - 1) : (splashFloor(x) + 1);
-+}
-+#endif
-+
-+// Used by drawImage and fillImageMask to divide the target
-+// quadrilateral into sections.
-+struct ImageSection {
-+ int y0, y1; // actual y range
-+ int ia0, ia1; // vertex indices for edge A
-+ int ib0, ib1; // vertex indices for edge A
-+ SplashCoord xa0, ya0, xa1, ya1; // edge A
-+ SplashCoord dxdya; // slope of edge A
-+ SplashCoord xb0, yb0, xb1, yb1; // edge B
-+ SplashCoord dxdyb; // slope of edge B
-+};
-+
- //------------------------------------------------------------------------
- // SplashPipe
- //------------------------------------------------------------------------
-@@ -1662,7 +2279,8 @@
- SplashPipe pipe;
- SplashClipResult clipRes;
- GBool noClip;
-- int alpha0, alpha;
-+ int alpha0;
-+ Guchar alpha;
- Guchar *p;
- int x1, y1, xx, xx1, yy;
-
@@ -1772,22 +2390,10 @@
SplashError Splash::fillImageMask(SplashImageMaskSource src, void *srcData,
int w, int h, SplashCoord *mat,
@@ -3098,71 +3038,6 @@ diff -ru xpdf-3.02/splash/Splash.h xpdf-3.03/splash/Splash.h
private:
-@@ -267,7 +288,68 @@
- SplashError fillGlyph2(int x0, int y0, SplashGlyphBitmap *glyph);
-+ void arbitraryTransformMask(SplashImageMaskSource src, void *srcData,
-+ int srcWidth, int srcHeight,
-+ SplashCoord *mat, GBool glyphMode);
-+ SplashBitmap *scaleMask(SplashImageMaskSource src, void *srcData,
-+ int srcWidth, int srcHeight,
-+ int scaledWidth, int scaledHeight);
-+ void scaleMaskYdXd(SplashImageMaskSource src, void *srcData,
-+ int srcWidth, int srcHeight,
-+ int scaledWidth, int scaledHeight,
-+ SplashBitmap *dest);
-+ void scaleMaskYdXu(SplashImageMaskSource src, void *srcData,
-+ int srcWidth, int srcHeight,
-+ int scaledWidth, int scaledHeight,
-+ SplashBitmap *dest);
-+ void scaleMaskYuXd(SplashImageMaskSource src, void *srcData,
-+ int srcWidth, int srcHeight,
-+ int scaledWidth, int scaledHeight,
-+ SplashBitmap *dest);
-+ void scaleMaskYuXu(SplashImageMaskSource src, void *srcData,
-+ int srcWidth, int srcHeight,
-+ int scaledWidth, int scaledHeight,
-+ SplashBitmap *dest);
-+ void blitMask(SplashBitmap *src, int xDest, int yDest,
-+ SplashClipResult clipRes);
-+ void arbitraryTransformImage(SplashImageSource src, void *srcData,
-+ SplashColorMode srcMode, int nComps,
-+ GBool srcAlpha,
-+ int srcWidth, int srcHeight,
-+ SplashCoord *mat);
-+ SplashBitmap *scaleImage(SplashImageSource src, void *srcData,
-+ SplashColorMode srcMode, int nComps,
-+ GBool srcAlpha, int srcWidth, int srcHeight,
-+ int scaledWidth, int scaledHeight);
-+ void scaleImageYdXd(SplashImageSource src, void *srcData,
-+ SplashColorMode srcMode, int nComps,
-+ GBool srcAlpha, int srcWidth, int srcHeight,
-+ int scaledWidth, int scaledHeight,
-+ SplashBitmap *dest);
-+ void scaleImageYdXu(SplashImageSource src, void *srcData,
-+ SplashColorMode srcMode, int nComps,
-+ GBool srcAlpha, int srcWidth, int srcHeight,
-+ int scaledWidth, int scaledHeight,
-+ SplashBitmap *dest);
-+ void scaleImageYuXd(SplashImageSource src, void *srcData,
-+ SplashColorMode srcMode, int nComps,
-+ GBool srcAlpha, int srcWidth, int srcHeight,
-+ int scaledWidth, int scaledHeight,
-+ SplashBitmap *dest);
-+ void scaleImageYuXu(SplashImageSource src, void *srcData,
-+ SplashColorMode srcMode, int nComps,
-+ GBool srcAlpha, int srcWidth, int srcHeight,
-+ int scaledWidth, int scaledHeight,
-+ SplashBitmap *dest);
-+ void vertFlipImage(SplashBitmap *img, int width, int height,
-+ int nComps);
-+ void blitImage(SplashBitmap *src, GBool srcAlpha, int xDest, int yDest,
-+ SplashClipResult clipRes);
-+ void blitImageClipped(SplashBitmap *src, GBool srcAlpha,
-+ int xSrc, int ySrc, int xDest, int yDest,
-+ int w, int h);
- void dumpPath(SplashPath *path);
- void dumpXPath(SplashXPath *path);
-
@@ -283,10 +365,12 @@
SplashBitmap *alpha0Bitmap; // for non-isolated groups, this is the
// bitmap containing the alpha0 values