private:
CPPUNIT_TEST_SUITE( AffineTransformTestCase );
CPPUNIT_TEST( InvertMatrix );
+#if wxUSE_DC_TRANSFORM_MATRIX
CPPUNIT_TEST( VMirrorAndTranslate );
CPPUNIT_TEST( Rotate90Clockwise );
+#endif // wxUSE_DC_TRANSFORM_MATRIX
CPPUNIT_TEST_SUITE_END();
void InvertMatrix();
+#if wxUSE_DC_TRANSFORM_MATRIX
void VMirrorAndTranslate();
void Rotate90Clockwise();
wxImage m_imgOrig;
wxBitmap m_bmpOrig;
+#endif // wxUSE_DC_TRANSFORM_MATRIX
DECLARE_NO_COPY_CLASS(AffineTransformTestCase)
};
void AffineTransformTestCase::setUp()
{
+#if wxUSE_DC_TRANSFORM_MATRIX
m_imgOrig.LoadFile("horse.jpg");
CPPUNIT_ASSERT( m_imgOrig.IsOk() );
m_bmpOrig = wxBitmap(m_imgOrig);
+#endif // wxUSE_DC_TRANSFORM_MATRIX
}
void AffineTransformTestCase::InvertMatrix()
CPPUNIT_ASSERT( matrix2.IsIdentity() );
}
+#if wxUSE_DC_TRANSFORM_MATRIX
+
void AffineTransformTestCase::VMirrorAndTranslate()
{
wxBitmap bmpUsingMatrix(m_bmpOrig.GetWidth(), m_bmpOrig.GetHeight());
CPPUNIT_ASSERT_EQUAL( imgUsingMatrix, imgOrigRotate90Clockwise );
}
+
+#endif // wxUSE_DC_TRANSFORM_MATRIX