aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/VectorRendererSpec.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index a6b3436e4c..4926479a8b 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -423,9 +423,9 @@ calcGradient(uint32 pos, uint32 max) {
PixelType output = 0;
pos = (MIN(pos * Base::_gradientFactor, max) << 12) / max;
- output |= (_gradientStart + ((Base::_gradientBytes[0] * pos) >> 12)) & _redMask;
- output |= (_gradientStart + ((Base::_gradientBytes[1] * pos) >> 12)) & _greenMask;
- output |= (_gradientStart + ((Base::_gradientBytes[2] * pos) >> 12)) & _blueMask;
+ output |= ((_gradientStart&_redMask) + ((Base::_gradientBytes[0] * pos) >> 12)) & _redMask;
+ output |= ((_gradientStart&_greenMask) + ((Base::_gradientBytes[1] * pos) >> 12)) & _greenMask;
+ output |= ((_gradientStart&_blueMask) + ((Base::_gradientBytes[2] * pos) >> 12)) & _blueMask;
output |= ~(_redMask | _greenMask | _blueMask);
return output;