diff --git a/include/wx/dcsvg.h b/include/wx/dcsvg.h index 79ac74e026..d19bba169c 100644 --- a/include/wx/dcsvg.h +++ b/include/wx/dcsvg.h @@ -117,6 +117,24 @@ public: return wxCOPY; } + virtual void SetLogicalOrigin(wxCoord x, wxCoord y) wxOVERRIDE + { + wxDCImpl::SetLogicalOrigin(x, y); + m_graphics_changed = true; + } + + virtual void SetDeviceOrigin(wxCoord x, wxCoord y) wxOVERRIDE + { + wxDCImpl::SetDeviceOrigin(x, y); + m_graphics_changed = true; + } + + virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp) wxOVERRIDE + { + wxDCImpl::SetAxisOrientation(xLeftRight, yBottomUp); + m_graphics_changed = true; + } + virtual void SetBackground( const wxBrush &brush ) wxOVERRIDE; virtual void SetBackgroundMode( int mode ) wxOVERRIDE; virtual void SetBrush(const wxBrush& brush) wxOVERRIDE; diff --git a/src/common/dcsvg.cpp b/src/common/dcsvg.cpp index 209d35e54a..f93396065f 100644 --- a/src/common/dcsvg.cpp +++ b/src/common/dcsvg.cpp @@ -1023,8 +1023,12 @@ void wxSVGFileDCImpl::DoStartNewGraphics() sPenJoin = wxT("stroke-linejoin:round; "); } - sLast.Printf( wxT("stroke-width:%d\" \n transform=\"translate(%s %s) scale(%s %s)\">"), - m_pen.GetWidth(), NumStr(m_logicalOriginX), NumStr(m_logicalOriginY), NumStr(m_scaleX), NumStr(m_scaleY) ); + sLast.Printf(wxT("stroke-width:%d\" transform=\"translate(%s %s) scale(%s %s)\">"), + m_pen.GetWidth(), + NumStr((m_deviceOriginX - m_logicalOriginX)* m_signX), + NumStr((m_deviceOriginY - m_logicalOriginY)* m_signY), + NumStr(m_scaleX * m_signX), + NumStr(m_scaleY * m_signY)); s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + wxT("\n"); write(s);