diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-08 11:33:28 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-08 11:33:28 +0200 |
commit | 1f35c8caa02eb9d27b87188f2fa21473ea694948 (patch) | |
tree | 918d3c9f20432204452ceab997e8c49dc2604319 /tests/auto/other/lancelot/paintcommands.cpp | |
parent | cc32a691936f37eaaec618a71edd62f896009c9d (diff) | |
parent | 551f73bd8d745881e70a7808385f1a35c2d12b2a (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
Diffstat (limited to 'tests/auto/other/lancelot/paintcommands.cpp')
-rw-r--r-- | tests/auto/other/lancelot/paintcommands.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/auto/other/lancelot/paintcommands.cpp index 8a2934049e..8fd22caa16 100644 --- a/tests/auto/other/lancelot/paintcommands.cpp +++ b/tests/auto/other/lancelot/paintcommands.cpp @@ -1010,7 +1010,10 @@ void PaintCommands::command_drawPixmap(QRegularExpressionMatch re) qPrintable(re.captured(1)), pm.width(), pm.height(), pm.depth(), tx, ty, tw, th, sx, sy, sw, sh); - m_painter->drawPixmap(QRectF(tx, ty, tw, th), pm, QRectF(sx, sy, sw, sh)); + if (!re.capturedLength(4)) // at most two coordinates specified + m_painter->drawPixmap(QPointF(tx, ty), pm); + else + m_painter->drawPixmap(QRectF(tx, ty, tw, th), pm, QRectF(sx, sy, sw, sh)); } /***************************************************************************************************/ @@ -1057,7 +1060,10 @@ void PaintCommands::command_drawImage(QRegularExpressionMatch re) printf(" -(lance) drawImage('%s' dim=(%d, %d), (%f, %f, %f, %f), (%f, %f, %f, %f)\n", qPrintable(re.captured(1)), im.width(), im.height(), tx, ty, tw, th, sx, sy, sw, sh); - m_painter->drawImage(QRectF(tx, ty, tw, th), im, QRectF(sx, sy, sw, sh), Qt::OrderedDither | Qt::OrderedAlphaDither); + if (!re.capturedLength(4)) // at most two coordinates specified + m_painter->drawImage(QPointF(tx, ty), im); + else + m_painter->drawImage(QRectF(tx, ty, tw, th), im, QRectF(sx, sy, sw, sh)); } /***************************************************************************************************/ |