X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..56b79cb98da2e2e3024fce6f6313546577c34821:/include/wx/matrix.h?ds=sidebyside diff --git a/include/wx/matrix.h b/include/wx/matrix.h index 1c5b592778..8204b66f39 100644 --- a/include/wx/matrix.h +++ b/include/wx/matrix.h @@ -9,8 +9,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __MATRIXH__ -#define __MATRIXH__ +#ifndef _WX_MATRIXH__ +#define _WX_MATRIXH__ #ifdef __GNUG__ #pragma interface "matrix.h" @@ -97,19 +97,24 @@ public: */ }; + +/* +The code is wrong and doesn't compile. Chris Breeze als reported, that +some functions of wxTransformMatrix cannot work because it is not +known if he matrix has been inverted. Be careful when using it. + // Transform X value from logical to device inline double wxTransformMatrix::TransformX(double x) const { -// return (m_isIdentity ? x : (x * m_matrix[0][0] + y * m_matrix[1][0] + m_matrix[2][0])); - return 0; + return (m_isIdentity ? x : (x * m_matrix[0][0] + y * m_matrix[1][0] + m_matrix[2][0])); } // Transform Y value from logical to device inline double wxTransformMatrix::TransformY(double y) const { -// return (m_isIdentity ? y : (x * m_matrix[0][1] + y * m_matrix[1][1] + m_matrix[2][1])); - return 0; + return (m_isIdentity ? y : (x * m_matrix[0][1] + y * m_matrix[1][1] + m_matrix[2][1])); } +*/ // Is the matrix the identity matrix? // Perhaps there's some kind of optimization we can do to make this @@ -136,4 +141,4 @@ inline double wxCalculateDet(double a11, double a21, double a12, double a22) } #endif - // __MATRIXH__ + // _WX_MATRIXH__