From c1e5f600abaee393e66fb04e2038bc97d82851ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 24 Jul 2012 15:23:49 +0200 Subject: Made QImage::fill(uint pixel) for RGB888 accept QRgb values. Previously QImage::fill() for Format_RGB888 expected a BGR value instead of the RGB order defined by QRgb, making it counter intuitive to use related to the 32-bit formats. Fixed the QPixelLayout data for RGB888 and changed the byte order of quint24 based on what the optimized image conversion routines expect. Change-Id: I72926debbc6f5b5cb10b8aa0b2a2a916a04db946 Reviewed-by: Kim M. Kalland --- tests/auto/gui/painting/qpainter/tst_qpainter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/gui/painting') diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index bd075eb2fe..3d0ec9f425 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -3172,7 +3172,7 @@ void tst_QPainter::drawImage_task258776() QImage src(16, 16, QImage::Format_RGB888); QImage dest(33, 33, QImage::Format_RGB888); src.fill(0x00ff00); - dest.fill(0x0000ff); + dest.fill(0xff0000); QPainter painter(&dest); painter.drawImage(QRectF(0.499, 0.499, 32, 32), src, QRectF(0, 0, 16, 16)); -- cgit v1.2.3