diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-06-12 14:41:19 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-06-12 15:21:15 (GMT) |
commit | 22fc2f7a832d8dc19c23b92710f520149e439971 (patch) | |
tree | 041f5d34a15f1191381ba51509578d1f33b2bb1b /src/gui/painting/qbrush.cpp | |
parent | 4c2697c093a495c289b1eb0689ac9bbca5442343 (diff) | |
download | Qt-22fc2f7a832d8dc19c23b92710f520149e439971.zip Qt-22fc2f7a832d8dc19c23b92710f520149e439971.tar.gz Qt-22fc2f7a832d8dc19c23b92710f520149e439971.tar.bz2 |
Fixed bitmap drawing in GL 2 engine when not using GL pixmap backend.
QPixmap shouldn't return true in hasAlphaChannel() for bitmaps, instead
the paint engine should check whether the pixmap is a bitmap or not. In
addition, QBrush::isOpaque() returned true for bitmap brushes, which is
wrong according to the documentation.
Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting/qbrush.cpp')
-rw-r--r-- | src/gui/painting/qbrush.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index ea93764..591f63e 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -846,7 +846,9 @@ bool QBrush::isOpaque() const return false; return true; } else if (d->style == Qt::TexturePattern) { - return !texture().hasAlpha(); + return qHasPixmapTexture(*this) + ? !texture().hasAlphaChannel() && !texture().isQBitmap() + : !textureImage().hasAlphaChannel(); } return false; |