summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-10-13 12:56:33 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-10-13 14:23:56 (GMT)
commit4b73217ceea55cb77eee550e039f8ec7ad566d80 (patch)
treef023cba5720f751e4db5770790f018facc3abbd1 /src/gui/painting
parent33ed3d0bacddce214a43be60eb6481903e753a88 (diff)
downloadQt-4b73217ceea55cb77eee550e039f8ec7ad566d80.zip
Qt-4b73217ceea55cb77eee550e039f8ec7ad566d80.tar.gz
Qt-4b73217ceea55cb77eee550e039f8ec7ad566d80.tar.bz2
Fixed bug where bitmaps were painted black instead of in pen colour.
penData and the pen painter state were not in sync when drawing bitmaps in the raster paint engine. Adding calls to ensurePen() fixed the bug. Task-number: QTBUG-4210 Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 6037bd5..995f0ac 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -2376,6 +2376,7 @@ void QRasterPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pixmap)
Q_D(QRasterPaintEngine);
QRasterPaintEngineState *s = state();
if (s->matrix.type() <= QTransform::TxTranslate) {
+ ensurePen();
drawBitmap(pos + QPointF(s->matrix.dx(), s->matrix.dy()), image, &s->penData);
} else {
drawImage(pos, d->rasterBuffer->colorizeBitmap(image, s->pen.color()));
@@ -2389,6 +2390,7 @@ void QRasterPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pixmap)
Q_D(QRasterPaintEngine);
QRasterPaintEngineState *s = state();
if (s->matrix.type() <= QTransform::TxTranslate) {
+ ensurePen();
drawBitmap(pos + QPointF(s->matrix.dx(), s->matrix.dy()), image, &s->penData);
} else {
drawImage(pos, d->rasterBuffer->colorizeBitmap(image, s->pen.color()));