X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7b65ea1af911e4ba65c47e2ed4f3138367b2bdbb..7b9da2077d0975db6c965a85c91d5aca671ab5e3:/src/motif/dc.cpp?ds=inline diff --git a/src/motif/dc.cpp b/src/motif/dc.cpp index 1ece237483..cba31c0c30 100644 --- a/src/motif/dc.cpp +++ b/src/motif/dc.cpp @@ -173,24 +173,12 @@ void wxDC::SetLogicalOrigin( wxCoord x, wxCoord y ) void wxDC::SetDeviceOrigin( wxCoord x, wxCoord y ) { - m_externalDeviceOriginX = x; - m_externalDeviceOriginY = y; + // only wxPostScripDC has m_signX = -1, we override SetDeviceOrigin there + m_deviceOriginX = x; + m_deviceOriginY = y; ComputeScaleAndOrigin(); } -void wxDC::SetInternalDeviceOrigin( wxCoord x, wxCoord y ) -{ - m_internalDeviceOriginX = x; - m_internalDeviceOriginY = y; - ComputeScaleAndOrigin(); -} - -void wxDC::GetInternalDeviceOrigin( wxCoord *x, wxCoord *y ) -{ - if (x) *x = m_internalDeviceOriginX; - if (y) *y = m_internalDeviceOriginY; -} - void wxDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp ) { m_signX = xLeftRight ? 1 : -1; @@ -240,25 +228,7 @@ wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const void wxDC::ComputeScaleAndOrigin() { - // CMB: copy scale to see if it changes - double origScaleX = m_scaleX; - double origScaleY = m_scaleY; - m_scaleX = m_logicalScaleX * m_userScaleX; m_scaleY = m_logicalScaleY * m_userScaleY; - - m_deviceOriginX = m_internalDeviceOriginX + m_externalDeviceOriginX; - m_deviceOriginY = m_internalDeviceOriginY + m_externalDeviceOriginY; - - // CMB: if scale has changed call SetPen to recalulate the line width - if (m_scaleX != origScaleX || m_scaleY != origScaleY) - { - // this is a bit artificial, but we need to force wxDC to think - // the pen has changed - wxPen* pen = & GetPen(); - wxPen tempPen; - m_pen = tempPen; - SetPen(* pen); - } }