X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/465642da29f90bee7865319214a276c64620e077..63dcc736df5d963de1df494452cdc5cd91ea0d21:/src/msw/graphics.cpp?ds=sidebyside diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index 65377a464e..d0c3c643ba 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -40,6 +40,7 @@ #include "wx/private/graphics.h" #include "wx/msw/wrapgdip.h" #include "wx/msw/dc.h" +#include "wx/msw/enhmeta.h" #include "wx/dcgraph.h" #include "wx/msw/private.h" // needs to be before #include @@ -1043,7 +1044,7 @@ void wxGDIPlusMatrixData::Scale( wxDouble xScale , wxDouble yScale ) // add the rotation to this matrix (radians) void wxGDIPlusMatrixData::Rotate( wxDouble angle ) { - m_matrix->Rotate( angle ); + m_matrix->Rotate( RadToDeg(angle) ); } // @@ -1631,6 +1632,8 @@ public : virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc); + virtual wxGraphicsContext * CreateContext( const wxEnhMetaFileDC& dc); + virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ); virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window ); @@ -1763,6 +1766,14 @@ wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxPrinterDC& dc) return new wxGDIPlusContext(this,(HDC) msw->GetHDC(), sz.x, sz.y); } +wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxEnhMetaFileDC& dc) +{ + ENSURE_LOADED_OR_RETURN(NULL); + wxMSWDCImpl *msw = wxDynamicCast( dc.GetImpl() , wxMSWDCImpl ); + wxSize sz = dc.GetSize(); + return new wxGDIPlusContext(this,(HDC) msw->GetHDC(), sz.x, sz.y); +} + wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxMemoryDC& dc) { ENSURE_LOADED_OR_RETURN(NULL);