Merge pull request #1359 from wxWidgets/fix-getclippingrect

Fix GetClippingRect to deal with the new GetClippingBox return value
This commit is contained in:
Robin Dunn
2019-09-14 01:13:21 -07:00
committed by GitHub

View File

@@ -84,13 +84,17 @@ def run():
c.find('GetLogicalOrigin.x').out = True
c.find('GetLogicalOrigin.y').out = True
c.find('GetClippingBox').findOverload('wxRect').ignore()
c.find('GetClippingBox.x').out = True
c.find('GetClippingBox.y').out = True
c.find('GetClippingBox.width').out = True
c.find('GetClippingBox.height').out = True
c.addPyMethod('GetClippingRect', '(self)',
doc="Gets the rectangle surrounding the current clipping region",
body="return wx.Rect(*self.GetClippingBox())")
doc="Returns the rectangle surrounding the current clipping region as a wx.Rect.",
body="""\
rv, x, y, w, h = self.GetClippingBox()
return wx.Rect(x,y,w,h)
""")
# Deal with the text-extent methods. In Classic we renamed one overloaded