X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0fd26ccb31c754351468834c742123424cf31521..8c36c49496660f0779584c6a318c7416c519f84d:/src/os2/dc.cpp diff --git a/src/os2/dc.cpp b/src/os2/dc.cpp index 9df4246a61..3e6e349b6a 100644 --- a/src/os2/dc.cpp +++ b/src/os2/dc.cpp @@ -2294,6 +2294,9 @@ void wxDC::SetMapMode( m_nWindowExtX = (int)MS_XDEV2LOG(VIEWPORT_EXTENT); m_nWindowExtY = (int)MS_YDEV2LOG(VIEWPORT_EXTENT); // ???? + + ComputeScaleAndOrigin(); + }; // end of wxDC::SetMapMode void wxDC::SetUserScale( double dX, @@ -2314,17 +2317,6 @@ void wxDC::SetAxisOrientation( bool bXLeftRight, SetMapMode(m_mappingMode); } // end of wxDC::SetAxisOrientation -void wxDC::SetSystemScale( - double dX -, double dY -) -{ - m_scaleX = dX; - m_scaleY = dY; - - SetMapMode(m_mappingMode); -} // end of wxDC::SetSystemScale - void wxDC::SetLogicalOrigin( wxCoord vX , wxCoord vY @@ -2365,54 +2357,6 @@ void wxDC::SetDeviceOrigin( ); }; // end of wxDC::SetDeviceOrigin -// --------------------------------------------------------------------------- -// coordinates transformations -// --------------------------------------------------------------------------- - -wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const -{ - return (wxCoord) (((x) - m_deviceOriginX)/(m_logicalScaleX*m_userScaleX*m_signX*m_scaleX) - m_logicalOriginX); -} - -wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const -{ - // 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 -{ - return (wxCoord) (((y) - m_deviceOriginY)/(m_logicalScaleY*m_userScaleY*m_signY*m_scaleY) - m_logicalOriginY); -} - -wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const -{ - // 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 -{ - return (wxCoord) ((x - m_logicalOriginX)*m_logicalScaleX*m_userScaleX*m_signX*m_scaleX + m_deviceOriginX); -} - -wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const -{ - // 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 -{ - return (wxCoord) ((y - m_logicalOriginY)*m_logicalScaleY*m_userScaleY*m_signY*m_scaleY + m_deviceOriginY); -} - -wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const -{ - // axis orientation is not taken into account for conversion of a distance - return (wxCoord) (y*m_logicalScaleY*m_userScaleY*m_scaleY); -} - // --------------------------------------------------------------------------- // bit blit // ---------------------------------------------------------------------------