// Author: Based on wxTransformMatrix by Chris Breeze, Julian Smart
// Created: 2011-04-05
// Copyright: (c) wxWidgets team
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#pragma hdrstop
#endif
+#if wxUSE_GEOMETRY
+
#include "wx/affinematrix2d.h"
#include "wx/math.h"
//
// add the translation to this matrix
+// | 1 0 0 | | m_11 m_12 0 |
+// | 0 1 0 | x | m_21 m_22 0 |
+// | dx dy 1 | | m_tx m_ty 1 |
void wxAffineMatrix2D::Translate(wxDouble dx, wxDouble dy)
{
- m_tx += dx;
- m_ty += dy;
+ m_tx += m_11 * dx + m_21 * dy;
+ m_ty += m_12 * dx + m_22 * dy;
}
// add the scale to this matrix
m_21 == 0 && m_22 == 1 &&
m_tx == 0 && m_ty == 0;
}
+
+#endif // wxUSE_GEOMETRY