]> git.saurik.com Git - wxWidgets.git/commitdiff
axis orientation must not be taken into account for conversion of a distance
authorGilles Depeyrot <gilles_depeyrot@mac.com>
Mon, 28 Jan 2002 15:02:25 +0000 (15:02 +0000)
committerGilles Depeyrot <gilles_depeyrot@mac.com>
Mon, 28 Jan 2002 15:02:25 +0000 (15:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dc.cpp
src/os2/dc.cpp

index e1b2d6966f8a24c96cea3c20da74b85f2a237969..406f0f2a1edb84542af5d775f16f598e5df1e214 100644 (file)
@@ -1529,8 +1529,8 @@ void wxDC::SetMapMode(int mode)
         ::SetMapMode(GetHdc(), MM_ANISOTROPIC);
 
     SetViewportExtEx(GetHdc(), VIEWPORT_EXTENT, VIEWPORT_EXTENT, NULL);
-    m_windowExtX = (int)MS_XDEV2LOGREL(VIEWPORT_EXTENT);
-    m_windowExtY = (int)MS_YDEV2LOGREL(VIEWPORT_EXTENT);
+    m_windowExtX = (int)MS_XDEV2LOG(VIEWPORT_EXTENT);
+    m_windowExtY = (int)MS_YDEV2LOG(VIEWPORT_EXTENT);
     ::SetWindowExtEx(GetHdc(), m_windowExtX, m_windowExtY, NULL);
     ::SetViewportOrgEx(GetHdc(), (int)m_deviceOriginX, (int)m_deviceOriginY, NULL);
     ::SetWindowOrgEx(GetHdc(), (int)m_logicalOriginX, (int)m_logicalOriginY, NULL);
@@ -1609,7 +1609,8 @@ wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const
 
 wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const
 {
-    return (wxCoord) ((x)/(m_logicalScaleX*m_userScaleX*m_signX*m_scaleX));
+       // axis orientation is not taken into account for conversion of a distance
+    return (wxCoord) ((x)/(m_logicalScaleX*m_userScaleX*m_scaleX));
 }
 
 wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
@@ -1621,7 +1622,8 @@ wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
 
 wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const
 {
-    return (wxCoord) ((y)/(m_logicalScaleY*m_userScaleY*m_signY*m_scaleY));
+       // axis orientation is not taken into account for conversion of a distance
+       return (wxCoord) ((y)/(m_logicalScaleY*m_userScaleY*m_scaleY));
 }
 
 wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
@@ -1631,7 +1633,8 @@ wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
 
 wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
 {
-    return (wxCoord) (x*m_logicalScaleX*m_userScaleX*m_signX*m_scaleX);
+       // axis orientation is not taken into account for conversion of a distance
+    return (wxCoord) (x*m_logicalScaleX*m_userScaleX*m_scaleX);
 }
 
 wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
@@ -1641,7 +1644,8 @@ wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
 
 wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
 {
-    return (wxCoord) (y*m_logicalScaleY*m_userScaleY*m_signY*m_scaleY);
+       // axis orientation is not taken into account for conversion of a distance
+    return (wxCoord) (y*m_logicalScaleY*m_userScaleY*m_scaleY);
 }
 
 // ---------------------------------------------------------------------------
index 2bee9f08e637ce9cd3fe9458967caec7a03331d7..8c8d8a66a4781c827fc546f915a95e75e41e2015 100644 (file)
@@ -1808,8 +1808,8 @@ void wxDC::SetMapMode(
         ulOptions = PU_ARBITRARY | GPIF_DEFAULT;
         ::GpiSetPS(m_hPS, &vSize, ulOptions);
     }
-    m_nWindowExtX = (int)MS_XDEV2LOGREL(VIEWPORT_EXTENT);
-    m_nWindowExtY = (int)MS_YDEV2LOGREL(VIEWPORT_EXTENT);
+    m_nWindowExtX = (int)MS_XDEV2LOG(VIEWPORT_EXTENT);
+    m_nWindowExtY = (int)MS_YDEV2LOG(VIEWPORT_EXTENT);
     // ????
 }; // end of wxDC::SetMapMode
 
@@ -1897,7 +1897,8 @@ wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const
 
 wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const
 {
-    return (wxCoord) ((x)/(m_logicalScaleX*m_userScaleX*m_signX*m_scaleX));
+       // axis orientation is not taken into account for conversion of a distance
+    return (wxCoord) ((x)/(m_logicalScaleX*m_userScaleX*m_scaleX));
 }
 
 wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
@@ -1907,7 +1908,8 @@ wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
 
 wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const
 {
-    return (wxCoord) ((y)/(m_logicalScaleY*m_userScaleY*m_signY*m_scaleY));
+       // axis orientation is not taken into account for conversion of a distance
+    return (wxCoord) ((y)/(m_logicalScaleY*m_userScaleY*m_scaleY));
 }
 
 wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
@@ -1917,7 +1919,8 @@ wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
 
 wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
 {
-    return (wxCoord) (x*m_logicalScaleX*m_userScaleX*m_signX*m_scaleX);
+       // axis orientation is not taken into account for conversion of a distance
+    return (wxCoord) (x*m_logicalScaleX*m_userScaleX*m_scaleX);
 }
 
 wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
@@ -1927,7 +1930,8 @@ wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
 
 wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
 {
-    return (wxCoord) (y*m_logicalScaleY*m_userScaleY*m_signY*m_scaleY);
+       // axis orientation is not taken into account for conversion of a distance
+    return (wxCoord) (y*m_logicalScaleY*m_userScaleY*m_scaleY);
 }
 
 // ---------------------------------------------------------------------------