Expose SetClippingRegion(point, size)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -57,7 +57,7 @@ class TestWindow(wxScrolledWindow):
|
||||
if not dc:
|
||||
dc = wxClientDC(self)
|
||||
rect = self.GetUpdateRegion().GetBox()
|
||||
dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height)
|
||||
dc.SetClippingRect(rect)
|
||||
self.TileBackground(dc)
|
||||
|
||||
|
||||
|
@@ -137,7 +137,7 @@ class DragCanvas(wxScrolledWindow):
|
||||
|
||||
def EraseShape(self, shape, dc):
|
||||
r = shape.GetRect()
|
||||
dc.SetClippingRegion(r.x, r.y, r.width, r.height)
|
||||
dc.SetClippingRect(r)
|
||||
self.TileBackground(dc)
|
||||
self.DrawShapes(dc)
|
||||
dc.DestroyClippingRegion()
|
||||
@@ -148,7 +148,7 @@ class DragCanvas(wxScrolledWindow):
|
||||
if not dc:
|
||||
dc = wxClientDC(self)
|
||||
rect = self.GetUpdateRegion().GetBox()
|
||||
dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height)
|
||||
dc.SetClippingRect(rect)
|
||||
self.TileBackground(dc)
|
||||
|
||||
|
||||
|
@@ -275,6 +275,11 @@ that are affected are listed here::
|
||||
Blit(destPt, size, sourceDC, srcPt,
|
||||
rop = wxCOPY, useMask = FALSE, srcPtMask = wx.DefaultPosition)
|
||||
|
||||
SetClippingRegionXY SetClippingRegion(x, y, width, height)
|
||||
SetClippingRegion(point, size)
|
||||
SetClippingRect(rect)
|
||||
SetClippingRegionAsRegion(region);
|
||||
|
||||
|
||||
If you have code that draws on a DC you **will** get errors because of
|
||||
these changes, but it should be easy to fix the code. You can either
|
||||
|
@@ -219,8 +219,8 @@ public:
|
||||
// clipping region
|
||||
// ---------------
|
||||
|
||||
void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
//void SetClippingRegion(const wxPoint& pt, const wxSize& sz)
|
||||
%name(SetClippingRegionXY)void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
|
||||
%name(SetClippingRect) void SetClippingRegion(const wxRect& rect);
|
||||
%name(SetClippingRegionAsRegion) void SetClippingRegion(const wxRegion& region);
|
||||
|
||||
|
@@ -61,7 +61,7 @@ class wxRightTextCtrl(wxTextCtrl):
|
||||
fclr = wxSystemSettings_GetColour(wxSYS_COLOUR_GRAYTEXT)
|
||||
dc.SetTextForeground(fclr)
|
||||
|
||||
dc.SetClippingRegion(0, 0, dcwidth, dcheight)
|
||||
dc.SetClippingRegionXY(0, 0, dcwidth, dcheight)
|
||||
dc.DrawText(text, x, y)
|
||||
|
||||
if x < 0:
|
||||
|
Reference in New Issue
Block a user