From 88c0b108970b44c90622eb1353840a9080fe6ce0 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 24 Dec 2003 01:24:58 +0000 Subject: [PATCH] Aliasing wxDC methods like was dangerous... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wxPython/_wx.py | 43 +++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/wxPython/wxPython/_wx.py b/wxPython/wxPython/_wx.py index 848c96b70c..55bf54dc42 100644 --- a/wxPython/wxPython/_wx.py +++ b/wxPython/wxPython/_wx.py @@ -34,22 +34,29 @@ def wxPyTypeCast(obj, typeStr): wxPy_isinstance = isinstance -wxDC.FloodFill = wxDC.FloodFillXY -wxDC.GetPixel = wxDC.GetPixelXY -wxDC.DrawLine = wxDC.DrawLineXY -wxDC.CrossHair = wxDC.CrossHairXY -wxDC.DrawArc = wxDC.DrawArcXY -wxDC.DrawCheckMark = wxDC.DrawCheckMarkXY -wxDC.DrawEllipticArc = wxDC.DrawEllipticArcXY -wxDC.DrawPoint = wxDC.DrawPointXY -wxDC.DrawRectangle = wxDC.DrawRectangleXY -wxDC.DrawRoundedRectangle = wxDC.DrawRoundedRectangleXY -wxDC.DrawCircle = wxDC.DrawCircleXY -wxDC.DrawEllipse = wxDC.DrawEllipseXY -wxDC.DrawIcon = wxDC.DrawIconXY -wxDC.DrawBitmap = wxDC.DrawBitmapXY -wxDC.DrawText = wxDC.DrawTextXY -wxDC.DrawRotatedText = wxDC.DrawRotatedTextXY -wxDC.Blit = wxDC.BlitXY -wxDC.SetClippingRegion = wxDC.SetClippingRegionXY + +# To get wxDC methods compatible with the old 2.4 wxDC uncomment these +# lines. Note however that doing this will break any code that +# expects the new-style methods. (Is there a way to do this that does +# not have that problem? I suppose we could provide two versions of +# the DC classes and just rename them here...) + +#wxDC.FloodFill = wxDC.FloodFillXY +#wxDC.GetPixel = wxDC.GetPixelXY +#wxDC.DrawLine = wxDC.DrawLineXY +#wxDC.CrossHair = wxDC.CrossHairXY +#wxDC.DrawArc = wxDC.DrawArcXY +#wxDC.DrawCheckMark = wxDC.DrawCheckMarkXY +#wxDC.DrawEllipticArc = wxDC.DrawEllipticArcXY +#wxDC.DrawPoint = wxDC.DrawPointXY +#wxDC.DrawRectangle = wxDC.DrawRectangleXY +#wxDC.DrawRoundedRectangle = wxDC.DrawRoundedRectangleXY +#wxDC.DrawCircle = wxDC.DrawCircleXY +#wxDC.DrawEllipse = wxDC.DrawEllipseXY +#wxDC.DrawIcon = wxDC.DrawIconXY +#wxDC.DrawBitmap = wxDC.DrawBitmapXY +#wxDC.DrawText = wxDC.DrawTextXY +#wxDC.DrawRotatedText = wxDC.DrawRotatedTextXY +#wxDC.Blit = wxDC.BlitXY +#wxDC.SetClippingRegion = wxDC.SetClippingRegionXY -- 2.45.2