[Qt-interest] wrong colors with qrgb888
ghal_maraz at gmx.de
ghal_maraz at gmx.de
Wed Jul 28 17:09:27 CEST 2010
hi,
i am using qt embedded(4.6.3) on a develpoment board with arm9 and 24bit
display.
my problem is that the colors are wrong. the red and blue part is mixed.
to find the problem i searched in the source and found the class qrgb888 in
src/gui/painting/qdrawhelper_p.h. this class returns its color value via
two methods. but these methods return different results. here the methods i
mean:
quint32 qrgb888::rawValue() const
{
return (data[2] << 16) | (data[1] << 8) | data[0];
}
qrgb888::operator quint32() const
{
return qRgb(data[0], data[1], data[2]);
}
Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)// set RGB value
{ return (0xffu << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b &
0xff); }
is this a bug and could be the reason for my problems?
best regards
ghal maraz
--
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100728/5c17ac34/attachment.html
More information about the Qt-interest-old
mailing list