Fix GetClippingRect to deal with the new GetClippingBox return value

This commit is contained in:
Robin Dunn
2019-09-13 20:29:32 -07:00
parent af214853ee
commit 9289e33167

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