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)
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()
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)
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
// 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);
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: