diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-07-17 12:36:47 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-07-21 13:54:53 (GMT) |
commit | 704bfb1c67dd20d465f56bb1704500cd044f9494 (patch) | |
tree | cafd172b1f0716b34d90facf04e6182341311798 /src/opengl | |
parent | 89038235d08a039145792e545c3efedfd3d93323 (diff) | |
download | Qt-704bfb1c67dd20d465f56bb1704500cd044f9494.zip Qt-704bfb1c67dd20d465f56bb1704500cd044f9494.tar.gz Qt-704bfb1c67dd20d465f56bb1704500cd044f9494.tar.bz2 |
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
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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); |