axis orientation must not be taken into account for conversion of a distance

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot
2002-01-28 15:02:25 +00:00
parent 7cc5a448dc
commit 74de9ed64b
2 changed files with 20 additions and 12 deletions

View 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);
}
// ---------------------------------------------------------------------------