forked from pool/scribus
66 lines
2.8 KiB
Diff
66 lines
2.8 KiB
Diff
From e0e7d7ce9d19d617f4eabc4472dc0c22a5b18c6a Mon Sep 17 00:00:00 2001
|
|
From: jghali <jghali@11d20701-8431-0410-a711-e3c959e3b870>
|
|
Date: Mon, 4 Mar 2024 20:39:54 +0000
|
|
Subject: [PATCH] Fix build failure with poppler 24.03.0
|
|
|
|
git-svn-id: svn://scribus.net/trunk/Scribus@26042 11d20701-8431-0410-a711-e3c959e3b870
|
|
---
|
|
scribus/plugins/import/pdf/slaoutput.cpp | 16 ++++++++++++++++
|
|
1 file changed, 16 insertions(+)
|
|
|
|
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
|
|
index 99dd487..2f4209e 100644
|
|
--- a/scribus/plugins/import/pdf/slaoutput.cpp
|
|
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
|
|
@@ -1845,7 +1845,11 @@ GBool SlaOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, d
|
|
VGradient FillGradient = VGradient(VGradient::linear);
|
|
FillGradient.clearStops();
|
|
GfxColorSpace *color_space = shading->getColorSpace();
|
|
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0)
|
|
+ if (func->getType() == Function::Type::Stitching)
|
|
+#else
|
|
if (func->getType() == 3)
|
|
+#endif
|
|
{
|
|
StitchingFunction *stitchingFunc = (StitchingFunction*)func;
|
|
const double *bounds = stitchingFunc->getBounds();
|
|
@@ -1867,7 +1871,11 @@ GBool SlaOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, d
|
|
FillGradient.addStop( ScColorEngine::getShadeColor(m_doc->PageColors[stopColor], m_doc, shade), stopPoint, 0.5, 1.0, stopColor, shade );
|
|
}
|
|
}
|
|
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0)
|
|
+ else if ((func->getType() == Function::Type::Exponential) || (func->getType() == Function::Type::Identity))
|
|
+#else
|
|
else if ((func->getType() == 2) || (func->getType() == 0))
|
|
+#endif
|
|
{
|
|
GfxColor stop1;
|
|
shading->getColor(0.0, &stop1);
|
|
@@ -1979,7 +1987,11 @@ GBool SlaOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading,
|
|
VGradient FillGradient = VGradient(VGradient::linear);
|
|
FillGradient.clearStops();
|
|
GfxColorSpace *color_space = shading->getColorSpace();
|
|
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0)
|
|
+ if (func->getType() == Function::Type::Stitching)
|
|
+#else
|
|
if (func->getType() == 3)
|
|
+#endif
|
|
{
|
|
StitchingFunction *stitchingFunc = (StitchingFunction*)func;
|
|
const double *bounds = stitchingFunc->getBounds();
|
|
@@ -2001,7 +2013,11 @@ GBool SlaOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading,
|
|
FillGradient.addStop( ScColorEngine::getShadeColor(m_doc->PageColors[stopColor], m_doc, shade), stopPoint, 0.5, 1.0, stopColor, shade );
|
|
}
|
|
}
|
|
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0)
|
|
+ else if ((func->getType() == Function::Type::Exponential) || (func->getType() == Function::Type::Identity))
|
|
+#else
|
|
else if ((func->getType() == 2) || (func->getType() == 0))
|
|
+#endif
|
|
{
|
|
GfxColor stop1;
|
|
shading->getColor(0.0, &stop1);
|
|
--
|
|
2.44.0
|
|
|