X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/091ef146b7630cd5eca8bcf9f4d97aa122513093..e83a2e04900ec19e809d32d985669e1c664dd5a8:/src/msw/graphics.cpp diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index a9d5c4c065..cda93a281a 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -896,7 +896,8 @@ wxGDIPlusContext::~wxGDIPlusContext() void wxGDIPlusContext::Clip( const wxRegion ®ion ) { - m_context->SetClip((HRGN)region.GetHRGN(),CombineModeIntersect); + Region rgn((HRGN)region.GetHRGN()); + m_context->SetClip(&rgn,CombineModeIntersect); } void wxGDIPlusContext::Clip( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) @@ -1226,6 +1227,8 @@ public : virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc); + virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc); + virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ); virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window ); @@ -1312,6 +1315,12 @@ wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxWindowDC& dc) return new wxGDIPlusContext(this,(HDC) dc.GetHDC()); } +wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxMemoryDC& dc) +{ + EnsureIsLoaded(); + return new wxGDIPlusContext(this,(HDC) dc.GetHDC()); +} + wxGraphicsContext * wxGDIPlusRenderer::CreateMeasuringContext() { EnsureIsLoaded();