summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2010-02-11 14:16:44 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2010-02-11 14:16:44 (GMT)
commit2acc883b3a339b716da9249a1366b08225acbd8a (patch)
treecb6d27afa7428712207acef5044a143538055bd8 /src/gui/image
parent3e7f05c1a07441a4b0e9ade893c519a050e5b8de (diff)
downloadQt-2acc883b3a339b716da9249a1366b08225acbd8a.zip
Qt-2acc883b3a339b716da9249a1366b08225acbd8a.tar.gz
Qt-2acc883b3a339b716da9249a1366b08225acbd8a.tar.bz2
document the slowness of QPixmap::hasAlpha()
Reviewed-by: Kim
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qpixmap.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index d1e5c40..1df7946 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1670,10 +1670,9 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
\o
The hasAlphaChannel() returns true if the pixmap has a format that
- respects the alpha channel, otherwise returns false, while the
- hasAlpha() function returns true if the pixmap has an alpha
- channel \e or a mask (otherwise false). The mask() function returns
- the mask as a QBitmap object, which can be set using setMask().
+ respects the alpha channel, otherwise returns false. The hasAlpha(),
+ setMask() and mask() functions are legacy and should not be used.
+ They are potentially very slow.
The createHeuristicMask() function creates and returns a 1-bpp
heuristic mask (i.e. a QBitmap) for this pixmap. It works by
@@ -1760,6 +1759,8 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
Returns true if this pixmap has an alpha channel, \e or has a
mask, otherwise returns false.
+ \warning This is potentially an expensive operation.
+
\sa hasAlphaChannel(), mask()
*/
bool QPixmap::hasAlpha() const