summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpainter/tst_qpainter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qpainter/tst_qpainter.cpp')
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index f358681..a94c300 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -252,6 +252,8 @@ private slots:
void QTBUG5939_attachPainterPrivate();
+ void drawPointScaled();
+
private:
void fillData();
void setPenColor(QPainter& p);
@@ -4522,6 +4524,26 @@ void tst_QPainter::QTBUG5939_attachPainterPrivate()
QCOMPARE(widget->deviceTransform, proxy->deviceTransform);
}
+void tst_QPainter::drawPointScaled()
+{
+ QImage image(32, 32, QImage::Format_RGB32);
+ image.fill(0xffffffff);
+
+ QPainter p(&image);
+
+ p.scale(0.1, 0.1);
+
+ QPen pen;
+ pen.setWidth(1000);
+ pen.setColor(Qt::red);
+
+ p.setPen(pen);
+ p.drawPoint(0, 0);
+ p.end();
+
+ QCOMPARE(image.pixel(16, 16), 0xffff0000);
+}
+
QTEST_MAIN(tst_QPainter)
#include "tst_qpainter.moc"