QSpanData: use isAffine() instead of rolling your own test
authorVitaliy Kharin <kvserr@gmail.com>
Mon, 10 Dec 2012 14:45:31 +0000 (18:45 +0400)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 12 Dec 2012 09:47:48 +0000 (10:47 +0100)
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 <gunnar.sletta@digia.com>
src/gui/painting/qpaintengine_raster.cpp

index 46648fe..0e9129f 100644 (file)
@@ -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