]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/graphics.cpp
local Bkgen add bakefile_gen dir
[wxWidgets.git] / src / msw / graphics.cpp
index a9d5c4c0651e07b414c6d944c82c61769d67cc8b..cda93a281a6dc15f7b1137fc66652d168a4d2d8a 100644 (file)
@@ -896,7 +896,8 @@ wxGDIPlusContext::~wxGDIPlusContext()
 
 void wxGDIPlusContext::Clip( const wxRegion &region )
 {
-    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();