deprecate wxDC::SetClippingRegion(wxRegion) overload and replace it with SetDeviceClippingRegion() to avoid confusion due to use of different kind of coordinates in this and other overloads of the same function; also rename wxDCImpl::DoSetClippingRegionAsRegion() to DoSetDeviceClippingRegion(); finally use bounding box of the region passed to wxDCClipper ctor to avoid interpreting coordinates differently for different ctors of the same class (see #8970)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2099,7 +2099,7 @@ void wxWindowDCImpl::DoSetClippingRegion( wxCoord x, wxCoord y,
|
||||
}
|
||||
}
|
||||
|
||||
void wxWindowDCImpl::DoSetClippingRegionAsRegion( const wxRegion& region )
|
||||
void wxWindowDCImpl::DoSetDeviceClippingRegion( const wxRegion& region )
|
||||
{
|
||||
SetDCClipping(region.GetX11Region());
|
||||
|
||||
@@ -2110,10 +2110,10 @@ void wxWindowDCImpl::DoSetClippingRegionAsRegion( const wxRegion& region )
|
||||
wxRect box = region.GetBox();
|
||||
|
||||
XRectangle rects[1];
|
||||
rects[0].x = (short)XLOG2DEV_2(box.x);
|
||||
rects[0].y = (short)YLOG2DEV_2(box.y);
|
||||
rects[0].width = (unsigned short)XLOG2DEVREL(box.width);
|
||||
rects[0].height = (unsigned short)YLOG2DEVREL(box.height);
|
||||
rects[0].x = (short)box.x;
|
||||
rects[0].y = (short)box.y;
|
||||
rects[0].width = (unsigned short)box.width;
|
||||
rects[0].height = (unsigned short)box.height;
|
||||
XSetClipRectangles((Display*) m_display, (GC) m_gcBacking,
|
||||
0, 0, rects, 1, Unsorted);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user