summaryrefslogtreecommitdiff
path: root/splash
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2014-07-21 00:29:28 +0200
committerAlbert Astals Cid <aacid@kde.org>2014-07-21 00:29:28 +0200
commitc841a703c4c1750fd7ac0d04c6c3e7d4af80b8fa (patch)
tree3f0adbc14364b5ea2bfd08108cb6cccb0119f7c5 /splash
parentce782112746f629a8e7be6f2daf6ece6ab19917d (diff)
Improve Overprintmode and shadings
Bug #80998
Diffstat (limited to 'splash')
-rw-r--r--splash/Splash.cc24
-rw-r--r--splash/SplashPattern.h6
2 files changed, 27 insertions, 3 deletions
diff --git a/splash/Splash.cc b/splash/Splash.cc
index 8d0765bd..fde272ac 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -361,9 +361,29 @@ void Splash::pipeRun(SplashPipe *pipe) {
// dynamic pattern
if (pipe->pattern) {
if (!pipe->pattern->getColor(pipe->x, pipe->y, pipe->cSrcVal)) {
- pipeIncX(pipe);
- return;
+ pipeIncX(pipe);
+ return;
}
+#if SPLASH_CMYK
+ if (bitmap->mode == splashModeCMYK8 || bitmap->mode == splashModeDeviceN8) {
+ if (state->fillOverprint && state->overprintMode && pipe->pattern->isCMYK()) {
+ Guint mask = 15;
+ if (pipe->cSrcVal[0] == 0) {
+ mask &= ~1;
+ }
+ if (pipe->cSrcVal[1] == 0) {
+ mask &= ~2;
+ }
+ if (pipe->cSrcVal[2] == 0) {
+ mask &= ~4;
+ }
+ if (pipe->cSrcVal[3] == 0) {
+ mask &= ~8;
+ }
+ state->overprintMask = mask;
+ }
+ }
+#endif
}
if (pipe->noTransparency && !state->blendFunc) {
diff --git a/splash/SplashPattern.h b/splash/SplashPattern.h
index 42c1660f..e678c9e2 100644
--- a/splash/SplashPattern.h
+++ b/splash/SplashPattern.h
@@ -11,7 +11,7 @@
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
-// Copyright (C) 2010, 2011 Thomas Freitag <Thomas.Freitag@alfa.de>
+// Copyright (C) 2010, 2011, 2014 Thomas Freitag <Thomas.Freitag@alfa.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
@@ -52,6 +52,8 @@ public:
// value for all pixels.
virtual GBool isStatic() = 0;
+ // Returns true if this pattern colorspace is CMYK.
+ virtual GBool isCMYK() = 0;
private:
};
@@ -74,6 +76,8 @@ public:
virtual GBool isStatic() { return gTrue; }
+ virtual GBool isCMYK() { return gFalse; }
+
private:
SplashColor color;