|
|
961913e |
--- inkscape-0.48.5/configure.ac
|
|
|
961913e |
+++ inkscape-0.48.5/configure.ac
|
|
|
961913e |
@@ -593,6 +593,11 @@ if test "x$popplernewercolorspaceapi" =
|
|
|
961913e |
AC_DEFINE(POPPLER_EVEN_NEWER_COLOR_SPACE_API, 1, [Use even newer color space API from Poppler >= 0.26.0])
|
|
|
961913e |
fi
|
|
|
961913e |
|
|
|
961913e |
+PKG_CHECK_MODULES(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API, poppler >= 0.29.0, popplernewernewcolorspaceapi=yes, popplernewernewcolorspaceapi=no)
|
|
|
961913e |
+if test "x$popplernewernewcolorspaceapi" = "xyes"; then
|
|
|
961913e |
+ AC_DEFINE(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API, 1, [Use even newer new color space API from Poppler >= 0.29.0])
|
|
|
961913e |
+fi
|
|
|
961913e |
+
|
|
|
961913e |
# Poppler's b604a008 commit changes this
|
|
|
961913e |
AC_MSG_CHECKING([whether Poppler's GfxPatch no longer uses GfxColor])
|
|
|
961913e |
popplergfxcolor="no"
|
|
|
961913e |
--- inkscape-0.48.5/src/extension/internal/pdfinput/pdf-parser.cpp
|
|
|
961913e |
+++ inkscape-0.48.5/src/extension/internal/pdfinput/pdf-parser.cpp
|
|
|
961913e |
@@ -860,7 +860,9 @@ void PdfParser::opSetExtGState(Object ar
|
|
|
961913e |
blendingColorSpace = NULL;
|
|
|
961913e |
isolated = knockout = gFalse;
|
|
|
961913e |
if (!obj4.dictLookup(const_cast<char*>("CS"), &obj5)->isNull()) {
|
|
|
961913e |
-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
|
|
|
961913e |
+#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
|
|
|
961913e |
+ blendingColorSpace = GfxColorSpace::parse(NULL, &obj5, NULL, NULL);
|
|
|
961913e |
+#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
|
|
|
961913e |
blendingColorSpace = GfxColorSpace::parse(&obj5, NULL, NULL);
|
|
|
961913e |
#elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
|
|
|
961913e |
blendingColorSpace = GfxColorSpace::parse(&obj5, NULL);
|
|
|
961913e |
@@ -1085,7 +1087,13 @@ void PdfParser::opSetFillColorSpace(Obje
|
|
|
961913e |
|
|
|
961913e |
state->setFillPattern(NULL);
|
|
|
961913e |
res->lookupColorSpace(args[0].getName(), &obj);
|
|
|
961913e |
-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
|
|
|
961913e |
+#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
|
|
|
961913e |
+ if (obj.isNull()) {
|
|
|
961913e |
+ colorSpace = GfxColorSpace::parse(NULL, &args[0], NULL, NULL);
|
|
|
961913e |
+ } else {
|
|
|
961913e |
+ colorSpace = GfxColorSpace::parse(NULL, &obj, NULL, NULL);
|
|
|
961913e |
+ }
|
|
|
961913e |
+#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
|
|
|
961913e |
if (obj.isNull()) {
|
|
|
961913e |
colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL);
|
|
|
961913e |
} else {
|
|
|
961913e |
@@ -1126,7 +1134,13 @@ void PdfParser::opSetStrokeColorSpace(Ob
|
|
|
961913e |
|
|
|
961913e |
state->setStrokePattern(NULL);
|
|
|
961913e |
res->lookupColorSpace(args[0].getName(), &obj);
|
|
|
961913e |
-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
|
|
|
961913e |
+#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
|
|
|
961913e |
+ if (obj.isNull()) {
|
|
|
961913e |
+ colorSpace = GfxColorSpace::parse(NULL, &args[0], NULL, NULL);
|
|
|
961913e |
+ } else {
|
|
|
961913e |
+ colorSpace = GfxColorSpace::parse(NULL, &obj, NULL, NULL);
|
|
|
961913e |
+ }
|
|
|
961913e |
+#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
|
|
|
961913e |
if (obj.isNull()) {
|
|
|
961913e |
colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL);
|
|
|
961913e |
} else {
|
|
|
961913e |
@@ -2756,7 +2770,9 @@ void PdfParser::doImage(Object *ref, Str
|
|
|
961913e |
}
|
|
|
961913e |
}
|
|
|
961913e |
if (!obj1.isNull()) {
|
|
|
961913e |
-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
|
|
|
961913e |
+#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
|
|
|
961913e |
+ colorSpace = GfxColorSpace::parse(NULL, &obj1, NULL, NULL);
|
|
|
961913e |
+#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
|
|
|
961913e |
colorSpace = GfxColorSpace::parse(&obj1, NULL, NULL);
|
|
|
961913e |
#elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
|
|
|
961913e |
colorSpace = GfxColorSpace::parse(&obj1, NULL);
|
|
|
961913e |
@@ -2847,7 +2863,9 @@ void PdfParser::doImage(Object *ref, Str
|
|
|
961913e |
obj2.free();
|
|
|
961913e |
}
|
|
|
961913e |
}
|
|
|
961913e |
-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
|
|
|
961913e |
+#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
|
|
|
961913e |
+ GfxColorSpace *maskColorSpace = GfxColorSpace::parse(NULL, &obj1, NULL, NULL);
|
|
|
961913e |
+#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
|
|
|
961913e |
GfxColorSpace *maskColorSpace = GfxColorSpace::parse(&obj1, NULL, NULL);
|
|
|
961913e |
#elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
|
|
|
961913e |
maskColorSpace = GfxColorSpace::parse(&obj1, NULL);
|
|
|
961913e |
@@ -3040,7 +3058,9 @@ void PdfParser::doForm(Object *str) {
|
|
|
961913e |
if (obj1.dictLookup(const_cast<char*>("S"), &obj2)->isName(const_cast<char*>("Transparency"))) {
|
|
|
961913e |
transpGroup = gTrue;
|
|
|
961913e |
if (!obj1.dictLookup(const_cast<char*>("CS"), &obj3)->isNull()) {
|
|
|
961913e |
-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
|
|
|
961913e |
+#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
|
|
|
961913e |
+ blendingColorSpace = GfxColorSpace::parse(NULL, &obj3, NULL, NULL);
|
|
|
961913e |
+#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
|
|
|
961913e |
blendingColorSpace = GfxColorSpace::parse(&obj3, NULL, NULL);
|
|
|
961913e |
#elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
|
|
|
961913e |
blendingColorSpace = GfxColorSpace::parse(&obj3, NULL);
|