diff options
author | Stefan Brüns <stefan.bruens@rwth-aachen.de> | 2018-05-29 23:49:05 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2018-05-29 23:49:05 +0200 |
commit | 1750c0155762e75d0a80ab55b50d1bfd172c2430 (patch) | |
tree | 7b2e3f7fd8049dfa7842de9be07f6d860f075e0d /splash | |
parent | fb4629eb4b1787332b88b330da16353e5ade7b4d (diff) |
splash: Correctly manipulate spot colors if SPOT_NCOMPS != 4
The default number of spot colors is 4, in this case the change is
without effect, otherwise only the last 4 colors where handled.
Diffstat (limited to 'splash')
-rw-r--r-- | splash/SplashTypes.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/splash/SplashTypes.h b/splash/SplashTypes.h index ca0e3bc0..1bede11c 100644 --- a/splash/SplashTypes.h +++ b/splash/SplashTypes.h @@ -17,6 +17,7 @@ // Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> // Copyright (C) 2010 William Bader <williambader@hotmail.com> // Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> +// Copyright (C) 2018 Stefan Brüns <stefan.bruens@rwth-aachen.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 @@ -126,7 +127,7 @@ static inline void splashClearColor(SplashColorPtr dest) { dest[2] = 0; #ifdef SPLASH_CMYK dest[3] = 0; - for (int i = SPOT_NCOMPS; i < SPOT_NCOMPS + 4; i++) + for (int i = 4; i < SPOT_NCOMPS + 4; i++) dest[i] = 0; #endif } @@ -137,7 +138,7 @@ static inline void splashColorCopy(SplashColorPtr dest, SplashColorPtr src) { dest[2] = src[2]; #ifdef SPLASH_CMYK dest[3] = src[3]; - for (int i = SPOT_NCOMPS; i < SPOT_NCOMPS + 4; i++) + for (int i = 4; i < SPOT_NCOMPS + 4; i++) dest[i] = src[i]; #endif } @@ -148,7 +149,7 @@ static inline void splashColorXor(SplashColorPtr dest, SplashColorPtr src) { dest[2] ^= src[2]; #ifdef SPLASH_CMYK dest[3] ^= src[3]; - for (int i = SPOT_NCOMPS; i < SPOT_NCOMPS + 4; i++) + for (int i = 4; i < SPOT_NCOMPS + 4; i++) dest[i] ^= src[i]; #endif } |