1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
Description: Fix build with Poppler >=22.9.0
sneakily included here is also r24999 fixing https://bugs.scribus.net/view.php?id=16767
Origin: upstream, https://www.scribus.net/websvn/revision.php?repname=Scribus&rev=25139
Acked-By: Mattia Rizzolo <mattia@dedbian.org>
Bug-Debian: https://bugs.debian.org/1026032
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/scribus/+bug/1999524
--- a/scribus/plugins/import/pdf/slaoutput.cpp
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
@@ -3740,16 +3740,21 @@
m_lineJoin = Qt::BevelJoin;
break;
}
- double lw = state->getLineWidth();
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 9, 0)
+ const auto& dashPattern = state->getLineDash(&DashOffset);
+ QVector<double> pattern(dashPattern.size());
+ for (size_t i = 0; i < dashPattern.size(); ++i)
+ pattern[i] = dashPattern[i];
+ DashValues = pattern;
+#else
double *dashPattern;
int dashLength;
state->getLineDash(&dashPattern, &dashLength, &DashOffset);
QVector<double> pattern(dashLength);
for (int i = 0; i < dashLength; ++i)
- {
- pattern[i] = dashPattern[i] / lw;
- }
+ pattern[i] = dashPattern[i];
DashValues = pattern;
+#endif
}
int SlaOutputDev::getBlendMode(GfxState *state)
|