]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/dc.cpp
really fix the length of the string returned by wxConvertStringToOle() (#10056)
[wxWidgets.git] / src / dfb / dc.cpp
index 16257ca195816affad5477d3b07452481fbb4b09..aecb71fa444f52ef3a506378ac4207cff6799889 100644 (file)
@@ -95,10 +95,19 @@ void wxDFBDCImpl::DoSetClippingRegion(wxCoord cx, wxCoord cy, wxCoord cw, wxCoor
     m_clipping = true;
 }
 
-void wxDFBDCImpl::DoSetClippingRegionAsRegion(const wxRegion& region)
+void wxDFBDCImpl::DoSetDeviceClippingRegion(const wxRegion& region)
 {
     // NB: this can be done because wxDFB only supports rectangular regions
-    GetOwner()->SetClippingRegion(region.AsRect());
+    wxRect rect = region.AsRect();
+
+    // our parameter is in physical coordinates while DoSetClippingRegion()
+    // takes logical ones
+    rect.x = XDEV2LOG(rect.x);
+    rect.y = YDEV2LOG(rect.y);
+    rect.width = XDEV2LOG(rect.width);
+    rect.height = YDEV2LOG(rect.height);
+
+    DoSetClippingRegion(rect.x, rect.y, rect.width, rect.height);
 }
 
 void wxDFBDCImpl::DestroyClippingRegion()