From 704bfb1c67dd20d465f56bb1704500cd044f9494 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Fri, 17 Jul 2009 14:36:47 +0200 Subject: Fixed opacity bug in the GL2 paint engine. When premultiplying a color with the opacity, the color's alpha channel was not set correcly. Reviewed-by: Tom --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index fa6b966..7e8a281 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -299,6 +299,7 @@ void QGL2PaintEngineExPrivate::updateTextureFilter(GLenum target, GLenum wrapMod QColor QGL2PaintEngineExPrivate::premultiplyColor(QColor c, GLfloat opacity) { qreal alpha = c.alphaF() * opacity; + c.setAlphaF(alpha); c.setRedF(c.redF() * alpha); c.setGreenF(c.greenF() * alpha); c.setBlueF(c.blueF() * alpha); -- cgit v0.12