diff --git a/docs/changes.txt b/docs/changes.txt index 085308bb49..faa63680f9 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -143,6 +143,7 @@ All (GUI): - Fix adding/removing items to/from wxRearrangeList. - Handle wxST_ELLIPSIZE_XXX styles in wxStaticText XRC handler (tm). - Add support for bitmaps to wxToggleButton XRC handler (tm). +- Fix wxGCDC::SetDeviceClippingRegion(). wxGTK: diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 4af620c22a..8e3afb3288 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -342,22 +342,6 @@ void wxGCDCImpl::DoSetDeviceClippingRegion( const wxRegion ®ion ) // region is in device coordinates wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoSetDeviceClippingRegion - invalid DC") ); -#ifdef __WXOSX__ - // This is a legacy implementation without - // full conversion from device to logical coordinates - // (only offset of the origin is taken into account, - // but e.g. scale is not). - // Solution with full conversion doesn't seem to work under WXOSX. - // TODO: Check wxMacCoreGraphics::Clip() and GetClipBox() - // and switch to the code used by other renderers (below). - wxRegion logRegion(region); - - logRegion.Offset(DeviceToLogicalX(0), DeviceToLogicalY(0)); - m_graphicContext->Clip(logRegion); - wxRect newRegion = logRegion.GetBox(); - wxDCImpl::DoSetClippingRegion(newRegion.GetLeft(), newRegion.GetTop(), - newRegion.GetWidth(), newRegion.GetHeight()); -#else // Because graphics context works with logical coordinates // and clipping region is given in device coordinates // we need temporarily reset graphics context's coordinate system @@ -378,7 +362,6 @@ void wxGCDCImpl::DoSetDeviceClippingRegion( const wxRegion ®ion ) m_clipping = true; UpdateClipBox(); -#endif // __WXOSX__ / !__WXOSX__ } void wxGCDCImpl::DestroyClippingRegion()