aboutsummaryrefslogtreecommitdiff
path: root/graphics/VectorRendererSpec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/VectorRendererSpec.cpp')
-rw-r--r--graphics/VectorRendererSpec.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index 37281839cb..ac21203da1 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -403,7 +403,10 @@ blendPixelPtr(PixelType *ptr, PixelType color, uint8 alpha) {
(int)(idst & PixelFormat::kGreenMask)) * alpha) >> 8))) |
(PixelFormat::kBlueMask & ((idst & PixelFormat::kBlueMask) +
((int)(((int)(isrc & PixelFormat::kBlueMask) -
- (int)(idst & PixelFormat::kBlueMask)) * alpha) >> 8))) );
+ (int)(idst & PixelFormat::kBlueMask)) * alpha) >> 8))) |
+ (PixelFormat::kAlphaMask & ((idst & PixelFormat::kAlphaMask) +
+ ((alpha >> (8 - PixelFormat::kAlphaBits)) << PixelFormat::kAlphaShift) -
+ (((int)(idst & PixelFormat::kAlphaMask) * alpha) >> 8))));
}
template <typename PixelType, typename PixelFormat>