summaryrefslogtreecommitdiff
path: root/poppler/SplashOutputDev.cc
diff options
context:
space:
mode:
authorOliver Sander <oliver.sander@tu-dresden.de>2020-04-21 16:03:37 +0200
committerOliver Sander <oliver.sander@tu-dresden.de>2020-04-21 20:56:20 +0200
commit846575911483787a0fe28d76c4e9b51a644d7152 (patch)
tree2e67048f78f7c2d5622230a372dd227c7465faec /poppler/SplashOutputDev.cc
parent9e302b6bf42c5d8b48bc5b6c04621e52d52da3f2 (diff)
[splash, arthur] Use stroking opacity when clipping to a stroke path
When filling a region that is clipped to a stroke path, then the stroking opacity shall be used rather than the fill opacity. I couldn't find this in the spec, but it seems to be what Acrobat does. BUG: https://gitlab.freedesktop.org/poppler/poppler/-/issues/178
Diffstat (limited to 'poppler/SplashOutputDev.cc')
-rw-r--r--poppler/SplashOutputDev.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 346e836d..2bcabc99 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -42,6 +42,7 @@
// Copyright (C) 2018, 2019 Stefan BrĂ¼ns <stefan.bruens@rwth-aachen.de>
// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de>
// Copyright (C) 2019 Christian Persch <chpe@src.gnome.org>
+// Copyright (C) 2020 Oliver Sander <oliver.sander@tu-dresden.de>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -4609,7 +4610,9 @@ bool SplashOutputDev::univariateShadedFill(GfxState *state, SplashUnivariatePatt
pattern->getShading()->getColorSpace()->createMapping(bitmap->getSeparationList(), SPOT_NCOMPS);
setOverprintMask(pattern->getShading()->getColorSpace(), state->getFillOverprint(),
state->getOverprintMode(), nullptr);
- retVal = (splash->shadedFill(&path, pattern->getShading()->getHasBBox(), pattern) == splashOk);
+ // If state->getStrokePattern() is set, then the current clipping region
+ // is a stroke path.
+ retVal = (splash->shadedFill(&path, pattern->getShading()->getHasBBox(), pattern, (state->getStrokePattern()!=nullptr)) == splashOk);
state->clearPath();
setVectorAntialias(vaa);
@@ -4670,7 +4673,9 @@ bool SplashOutputDev::functionShadedFill(GfxState *state, GfxFunctionShading *sh
pattern->getShading()->getColorSpace()->createMapping(bitmap->getSeparationList(), SPOT_NCOMPS);
setOverprintMask(pattern->getShading()->getColorSpace(), state->getFillOverprint(),
state->getOverprintMode(), nullptr);
- retVal = (splash->shadedFill(&path, pattern->getShading()->getHasBBox(), pattern) == splashOk);
+ // If state->getStrokePattern() is set, then the current clipping region
+ // is a stroke path.
+ retVal = (splash->shadedFill(&path, pattern->getShading()->getHasBBox(), pattern, (state->getStrokePattern()!=nullptr)) == splashOk);
state->clearPath();
setVectorAntialias(vaa);