#include <stdio.h>
#include <memory.h>
#include <assert.h>
-#include "config.h"
#include "BitmapOutputDev.h"
#include "GFXOutputDev.h"
-#include "SplashBitmap.h"
-#include "SplashPattern.h"
-#include "Splash.h"
+
+#ifdef HAVE_POPPLER
+ #include "splash/SplashBitmap.h"
+ #include "splash/SplashPattern.h"
+ #include "splash/Splash.h"
+#else
+ #include "xpdf/config.h"
+ #include "SplashBitmap.h"
+ #include "SplashPattern.h"
+ #include "Splash.h"
+#endif
+
#include "../log.h"
#include "../png.h"
#include "../devices/record.h"
rgbdev->eoFill(state);
dbg_newdata("eofill");
}
-#if (xpdfMajorVersion*10000 + xpdfMinorVersion*100 + xpdfUpdateVersion) < 30207
-void BitmapOutputDev::tilingPatternFill(GfxState *state, Object *str,
- int paintType, Dict *resDict,
- double *mat, double *bbox,
- int x0, int y0, int x1, int y1,
- double xStep, double yStep)
-{
- msg("<debug> tilingPatternFill");
- boolpolydev->tilingPatternFill(state, str, paintType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep);
- checkNewBitmap(UNKNOWN_BOUNDING_BOX);
- rgbdev->tilingPatternFill(state, str, paintType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep);
- dbg_newdata("tilingpatternfill");
-}
-#else
-void BitmapOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx, Object *str,
+
+POPPLER_TILING_PATERN_RETURN BitmapOutputDev::tilingPatternFill(GfxState *state, POPPLER_TILING_PATERN_GFX Object *str,
int paintType, Dict *resDict,
double *mat, double *bbox,
int x0, int y0, int x1, int y1,
double xStep, double yStep)
{
msg("<debug> tilingPatternFill");
- boolpolydev->tilingPatternFill(state, gfx, str, paintType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep);
+ boolpolydev->tilingPatternFill(state, POPPLER_TILING_PATERN_GFX_ARG str, paintType, resDict, mat,
+ bbox, x0, y0, x1, y1, xStep, yStep);
checkNewBitmap(UNKNOWN_BOUNDING_BOX);
- rgbdev->tilingPatternFill(state, gfx, str, paintType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep);
+ rgbdev->tilingPatternFill(state, POPPLER_TILING_PATERN_GFX_ARG str, paintType, resDict, mat,
+ bbox, x0, y0, x1, y1, xStep, yStep);
dbg_newdata("tilingpatternfill");
-}
+#ifdef HAVE_POPPLER
+ return gTrue;
#endif
+}
GBool BitmapOutputDev::functionShadedFill(GfxState *state, GfxFunctionShading *shading)
{
#include "../gfxsource.h"
#include "../gfxtools.h"
-#include "config.h"
+#include "../../config.h"
#include "GFXOutputDev.h"
#include "InfoOutputDev.h"
#include "PDFDoc.h"
#include "CommonOutputDev.h"
+#include "popplercompat.h"
struct ClipState
{
virtual void stroke(GfxState *state);
virtual void fill(GfxState *state);
virtual void eoFill(GfxState *state);
-#if (xpdfMajorVersion < 3) || (xpdfMinorVersion < 2) || (xpdfUpdateVersion < 7)
- virtual void tilingPatternFill(GfxState *state, Object *str,
+ virtual POPPLER_TILING_PATERN_RETURN tilingPatternFill(
+ GfxState *state, POPPLER_TILING_PATERN_GFX Object *str,
int paintType, Dict *resDict,
double *mat, double *bbox,
int x0, int y0, int x1, int y1,
double xStep, double yStep);
-#else
- virtual void tilingPatternFill(GfxState *state, Gfx *gfx, Object *str,
- int paintType, Dict *resDict,
- double *mat, double *bbox,
- int x0, int y0, int x1, int y1,
- double xStep, double yStep);
-#endif
virtual GBool functionShadedFill(GfxState *state,
GfxFunctionShading *shading);
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
-#include "config.h"
#include "FullBitmapOutputDev.h"
#include "GFXOutputDev.h"
-#include "SplashBitmap.h"
-#include "SplashPattern.h"
-#include "Splash.h"
+
+#ifdef HAVE_POPPLER
+ #include "splash/SplashBitmap.h"
+ #include "splash/SplashPattern.h"
+ #include "splash/Splash.h"
+#else
+ #include "xpdf/config.h"
+ #include "SplashBitmap.h"
+ #include "SplashPattern.h"
+ #include "Splash.h"
+#endif
+
#include "../log.h"
#include "../png.h"
#include "../devices/record.h"
msg("<debug> eoFill");
rgbdev->eoFill(state);
}
-#if (xpdfMajorVersion*10000 + xpdfMinorVersion*100 + xpdfUpdateVersion) < 30207
-void FullBitmapOutputDev::tilingPatternFill(GfxState *state, Object *str,
+POPPLER_TILING_PATERN_RETURN FullBitmapOutputDev::tilingPatternFill(GfxState *state, POPPLER_TILING_PATERN_GFX
+ Object *str,
int paintType, Dict *resDict,
double *mat, double *bbox,
int x0, int y0, int x1, int y1,
double xStep, double yStep)
{
msg("<debug> tilingPatternFill");
- rgbdev->tilingPatternFill(state, str, paintType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep);
-}
-#else
-void FullBitmapOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx, Object *str,
- int paintType, Dict *resDict,
- double *mat, double *bbox,
- int x0, int y0, int x1, int y1,
- double xStep, double yStep)
-{
- msg("<debug> tilingPatternFill");
- rgbdev->tilingPatternFill(state, gfx, str, paintType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep);
-}
+#ifdef HAVE_POPPLER
+ return
#endif
+ rgbdev->tilingPatternFill(state, POPPLER_TILING_PATERN_GFX_ARG str, paintType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep);
+}
GBool FullBitmapOutputDev::functionShadedFill(GfxState *state, GfxFunctionShading *shading)
{
#include "../gfxsource.h"
#include "../gfxtools.h"
-#include "config.h"
+#include "../../config.h"
#include "GFXOutputDev.h"
#include "InfoOutputDev.h"
#include "PDFDoc.h"
virtual void stroke(GfxState *state);
virtual void fill(GfxState *state);
virtual void eoFill(GfxState *state);
-#if (xpdfMajorVersion < 3) || (xpdfMinorVersion < 2) || (xpdfUpdateVersion < 7)
- virtual void tilingPatternFill(GfxState *state, Object *str,
+ virtual POPPLER_TILING_PATERN_RETURN tilingPatternFill(GfxState *state,
+ POPPLER_TILING_PATERN_GFX Object *str,
int paintType, Dict *resDict,
double *mat, double *bbox,
int x0, int y0, int x1, int y1,
double xStep, double yStep);
-#else
- virtual void tilingPatternFill(GfxState *state, Gfx *gfx, Object *str,
- int paintType, Dict *resDict,
- double *mat, double *bbox,
- int x0, int y0, int x1, int y1,
- double xStep, double yStep);
-#endif
virtual GBool functionShadedFill(GfxState *state,
GfxFunctionShading *shading);
#ifdef HAVE_FONTCONFIG
#include <fontconfig.h>
#endif
+
+#include "../../config.h"
+
//xpdf header files
-#include "config.h"
-#ifdef HAVE_POPPLER
-#include <goo/GooString.h>
-#include <goo/gfile.h>
+#include "popplercompat.h"
+ #ifdef HAVE_POPPLER
+ #include <goo/GooString.h>
+ #include <goo/gfile.h>
#else
-#include "gfile.h"
-#include "GString.h"
+ #include "xpdf/config.h"
+ #include "gfile.h"
+ #include "GString.h"
#endif
+
#include "Object.h"
#include "Stream.h"
#include "Array.h"
*ny += user_movey + clipmovey;
}
-
-#if (xpdfMajorVersion*10000 + xpdfMinorVersion*100 + xpdfUpdateVersion) < 30207
-void GFXOutputDev::tilingPatternFill(GfxState *state, Object *str,
- int paintType, Dict *resDict,
- double *mat, double *bbox,
- int x0, int y0, int x1, int y1,
- double xStep, double yStep)
-#else
-void GFXOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx, Object *str,
+POPPLER_TILING_PATERN_RETURN GFXOutputDev::tilingPatternFill(GfxState *state,
+ POPPLER_TILING_PATERN_GFX
+ Object *str,
int paintType, Dict *resDict,
double *mat, double *bbox,
int x0, int y0, int x1, int y1,
double xStep, double yStep)
-#endif
{
msg("<debug> tilingPatternFill");
infofeature("tiling pattern fills");
+#ifdef HAVE_POPPLER
+ // since we don't implement this method yet,
+ // reduce it to a series of other drawing operations.
+ return gFalse;
+#endif
}
GBool GFXOutputDev::functionShadedFill(GfxState *state, GfxFunctionShading *shading)
#include "../gfxsource.h"
#include "../gfxtools.h"
-#include "config.h"
#include "InfoOutputDev.h"
#include "PDFDoc.h"
#include "GlobalParams.h"
virtual GBool useTilingPatternFill();
virtual GBool useShadedFills();
-#if (xpdfMajorVersion < 3) || (xpdfMinorVersion < 2) || (xpdfUpdateVersion < 7)
- virtual void tilingPatternFill(GfxState *state, Object *str,
+virtual POPPLER_TILING_PATERN_RETURN tilingPatternFill(GfxState *state,
+ POPPLER_TILING_PATERN_GFX
+ Object *str,
int paintType, Dict *resDict,
double *mat, double *bbox,
int x0, int y0, int x1, int y1,
double xStep, double yStep);
-#else
- virtual void tilingPatternFill(GfxState *state, Gfx *gfx, Object *str,
- int paintType, Dict *resDict,
- double *mat, double *bbox,
- int x0, int y0, int x1, int y1,
- double xStep, double yStep);
-#endif
virtual GBool functionShadedFill(GfxState *state,
GfxFunctionShading *shading);
virtual GBool axialShadedFill(GfxState *state, GfxAxialShading *shading);
--- /dev/null
+#ifndef __popplercompat_h__
+#define __popplercompat_h__
+
+#include "../../config.h"
+
+#ifdef HAVE_POPPLER
+ #define POPPLER_TILING_PATERN_RETURN GBool
+ #define POPPLER_TILING_PATERN_GFX
+ #define POPPLER_TILING_PATERN_GFX_ARG
+#else
+ #define POPPLER_TILING_PATERN_RETURN void
+ #if (xpdfMajorVersion*10000 + xpdfMinorVersion*100 + xpdfUpdateVersion) < 30207
+ #define POPPLER_TILING_PATERN_GFX
+ #define POPPLER_TILING_PATERN_GFX_ARG
+ #else
+ #define POPPLER_TILING_PATERN_GFX Gfx *gfx,
+ #define POPPLER_TILING_PATERN_GFX_ARG gfx,
+ #endif
+#endif
+
+#endif