diff options
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 4 | ||||
-rw-r--r-- | tests/auto/other/lancelot/scripts/pixmap_rotation.qps | 5 | ||||
-rw-r--r-- | tests/auto/other/lancelot/scripts/pixmap_rotation2.qps | 8 |
3 files changed, 13 insertions, 4 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 656b04fdf3..724af095ad 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -2231,7 +2231,7 @@ static const uint * QT_FASTCALL fetchTransformedBilinearARGB32PM(uint *buffer, c } } } else { //rotation - if (std::abs(data->m11) > 8 || std::abs(data->m22) > 8) { + if (std::abs(data->m11) < (1./8.) || std::abs(data->m22) < (1./8.)) { //if we are zooming more than 8 times, we use 8bit precision for the position. while (b < end) { int x1 = (fx >> 16); @@ -2717,7 +2717,7 @@ static const uint *QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Oper layout->convertToARGB32PM(buf1, buf1, len * 2, clut, 0); layout->convertToARGB32PM(buf2, buf2, len * 2, clut, 0); - if (std::abs(data->m11) > 8 || std::abs(data->m22) > 8) { + if (std::abs(data->m11) < (1./8.) || std::abs(data->m22) < (1./8.)) { //if we are zooming more than 8 times, we use 8bit precision for the position. for (int i = 0; i < len; ++i) { int distx = (fracX & 0x0000ffff) >> 8; diff --git a/tests/auto/other/lancelot/scripts/pixmap_rotation.qps b/tests/auto/other/lancelot/scripts/pixmap_rotation.qps index 2f1ffb53e6..8427af85af 100644 --- a/tests/auto/other/lancelot/scripts/pixmap_rotation.qps +++ b/tests/auto/other/lancelot/scripts/pixmap_rotation.qps @@ -22,9 +22,10 @@ end_block resetMatrix translate 340 120 +setRenderHint SmoothPixmapTransformation repeat_block drawing resetMatrix -drawText 50 240 "Normal X form" -drawText 270 240 "Smooth xform"
\ No newline at end of file +drawText 50 240 "Normal Xform" +drawText 270 240 "Smooth Xform" diff --git a/tests/auto/other/lancelot/scripts/pixmap_rotation2.qps b/tests/auto/other/lancelot/scripts/pixmap_rotation2.qps new file mode 100644 index 0000000000..dfb93fe09c --- /dev/null +++ b/tests/auto/other/lancelot/scripts/pixmap_rotation2.qps @@ -0,0 +1,8 @@ +# Version: 1 +# CheckVsReference: 1% + +setRenderHint SmoothPixmapTransformation +translate 400 -120 +rotate 45 +scale 400 400 +drawImage solid2x2.png 0 0 |