X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7b65ea1af911e4ba65c47e2ed4f3138367b2bdbb..19e30148e18cc99296b26503c155e5cef59045f4:/src/motif/dc.cpp?ds=inline diff --git a/src/motif/dc.cpp b/src/motif/dc.cpp index 1ece237483..cc5c5359a4 100644 --- a/src/motif/dc.cpp +++ b/src/motif/dc.cpp @@ -17,9 +17,7 @@ #include "wx/dcmemory.h" #include "wx/defs.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) -#endif //----------------------------------------------------------------------------- // constants @@ -173,24 +171,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 +226,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); - } }