diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2011-01-12 09:47:29 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2011-01-12 10:20:06 (GMT) |
commit | a53e579a388c6bca6374b56328622bc8c1e0f138 (patch) | |
tree | 5ac6aa633dff674e098eb3c22f2d1fb03a2e2cf1 /examples | |
parent | 6e16cc33983c9ed2c8362f0d31ef712df7949375 (diff) | |
download | Qt-a53e579a388c6bca6374b56328622bc8c1e0f138.zip Qt-a53e579a388c6bca6374b56328622bc8c1e0f138.tar.gz Qt-a53e579a388c6bca6374b56328622bc8c1e0f138.tar.bz2 |
Mac: pixmaps dont treat alpha exactly the same as other platforms
From fixing qwidget autotest, it seems to be the case that filling
a pixmap with a solid color on mac changes the hasAlpha status. This
is different from X11 (and raster engine). That is, the following
code will produce different result:
QPixmap pixmap(100, 100);
pixmap.setAlphaChannel(QPixmap(100, 100));
qDebug() << "Has alpha after setting channel?" << pixmap.hasAlpha();
pixmap.fill(Qt::red);
qDebug() << "Has alpha after fill?" << pixmap.hasAlpha();
So, this patch remove the possibility of converting an already alpha
supporting pixmap to non-alpha upon fill. NB: somewhat related, the
following code works the same on both x11, raster and mac (prints
'false'), but still seems wrong:
QPixmap pixmap2(pixmap);
qDebug() << "pixmap2 has alpha initially?" << pixmap2.hasAlpha();
Rev-By: Fabien Freling
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions