Fix wxAffineMatrix2D::Translate() to multiply on the left.
The affine transform was previously multiplied by the translation matrix on the right but this was incompatible with both the MSW version of the same method and all the other methods of the generic version. So multiply the transform by the translation on the left, as everywhere else. Closes #13875. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -112,7 +112,7 @@ 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);
|
||||
}
|
||||
@@ -134,7 +134,7 @@ 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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user