]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/graphics/affinematrix.cpp
Removed redundant DoEnable
[wxWidgets.git] / tests / graphics / affinematrix.cpp
index 0e544663f11840b87555d11e0fb750763e0e0c4a..90f56cc1a9ce150fbf1d2ea5f30bdf81fdcdcf65 100644 (file)
@@ -60,7 +60,7 @@ private:
 // register in the unnamed registry so that these tests are run by default
 CPPUNIT_TEST_SUITE_REGISTRATION( AffineTransformTestCase );
 
-// also include in it's own registry so that these tests can be run alone
+// also include in its own registry so that these tests can be run alone
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( AffineTransformTestCase, "AffineTransformTestCase" );
 
 void AffineTransformTestCase::setUp()
@@ -112,15 +112,13 @@ void AffineTransformTestCase::VMirrorAndTranslate()
 
         wxAffineMatrix2D matrix;
         matrix.Mirror(wxVERTICAL);
-        matrix.Translate(0, m_bmpOrig.GetHeight() - 1);
+        matrix.Translate(0, -m_bmpOrig.GetHeight() + 1);
         dc.SetTransformMatrix(matrix);
         dc.DrawBitmap(m_bmpOrig, 0, 0);
     }
 
-    wxImage imgUsingMatrix = bmpUsingMatrix.ConvertToImage();
-    wxImage imgOrigVMirrored = m_imgOrig.Mirror(false);
-
-    CPPUNIT_ASSERT_EQUAL( imgUsingMatrix, imgOrigVMirrored );
+    CPPUNIT_ASSERT_EQUAL( bmpUsingMatrix.ConvertToImage(),
+                          m_imgOrig.Mirror(false) );
 }
 
 void AffineTransformTestCase::Rotate90Clockwise()
@@ -136,15 +134,13 @@ void AffineTransformTestCase::Rotate90Clockwise()
 
         wxAffineMatrix2D matrix;
         matrix.Rotate(-0.5 * M_PI);
-        matrix.Translate(m_bmpOrig.GetHeight(), 0);
+        matrix.Translate(0, -m_bmpOrig.GetHeight());
         dc.SetTransformMatrix(matrix);
         dc.DrawBitmap(m_bmpOrig, 0, 0);
     }
 
-    wxImage imgUsingMatrix = bmpUsingMatrix.ConvertToImage();
-    wxImage imgOrigRotate90Clockwise = m_imgOrig.Rotate90(true);
-
-    CPPUNIT_ASSERT_EQUAL( imgUsingMatrix, imgOrigRotate90Clockwise );
+    CPPUNIT_ASSERT_EQUAL( bmpUsingMatrix.ConvertToImage(),
+                          m_imgOrig.Rotate90(true) );
 }
 
 #endif // wxUSE_DC_TRANSFORM_MATRIX