]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/graphics.cpp
Wine fixes
[wxWidgets.git] / src / msw / graphics.cpp
index 4e847c1897b3509924084db420de538b5524bec7..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,12 +1227,16 @@ public :
 
     virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc);
 
+    virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc);
+
     virtual wxGraphicsContext * CreateContextFromNativeContext( void * context );
 
     virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window );
 
     virtual wxGraphicsContext * CreateContext( wxWindow* window );
 
+    virtual wxGraphicsContext * CreateMeasuringContext();
+
     // Path
 
     virtual wxGraphicsPath CreatePath();
@@ -1310,6 +1315,20 @@ 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();
+    return NULL;
+    // TODO use GetDC(NULL) but then we have to release it from the context
+    //return new wxGDIPlusContext(this,(HDC) dc.GetHDC());
+}
+
 wxGraphicsContext * wxGDIPlusRenderer::CreateContextFromNativeContext( void * context )
 {
     EnsureIsLoaded();