From 49ba35b9904a05ec1c7d768f8c079ce3c7d283fe Mon Sep 17 00:00:00 2001 From: Vitaliy Kharin Date: Mon, 10 Dec 2012 18:45:31 +0400 Subject: [PATCH] QSpanData: use isAffine() instead of rolling your own test QSpanData did not properly check that whether the matrix is an affine transformation or not. Therefore, qt paint engine chose the wrong algorithm for drawing in case of a perpective matrix. Change-Id: If0523bd45e86679a08874713da3fbe33a9852551 Reviewed-by: Gunnar Sletta --- src/gui/painting/qpaintengine_raster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 46648fe297..0e9129f8c0 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -4588,7 +4588,7 @@ void QSpanData::setupMatrix(const QTransform &matrix, int bilin) txop = inv.type(); bilinear = bilin; - const bool affine = !m13 && !m23; + const bool affine = inv.isAffine(); fast_matrix = affine && m11 * m11 + m21 * m21 < 1e4 && m12 * m12 + m22 * m22 < 1e4