Kevin Altis wrote:
On Apr 29, 2004, at 2:42 PM, Robin Dunn wrote:
Hi all,
Attached is a module that will fiddle with the attributes of the wx.DC class to make the methods be like they will be in the next release. All you need to do is import it in your app and then the DC draw methods with the "normal" names will have the 2.4 semantics, he new methods taking point and/or size will have a new set of names, and the XY names will be removed. See the module docstring for more info and a warning. I would appreciate it if some of you can please test it.
It seems a bit silly to use abbreviations like PtSz when some of the methods spell out Point and Rect. Yes it is more typing, but why not just use PointSize?
No real reason, it just looked too long. I'll change it.
_names = [
("FloodFillXY", "FloodFill", "FloodFillPoint"),
("GetPixelXY", "GetPixel", "GetPixelPoint"),
("DrawLineXY", "DrawLine", "DrawLinePoint"),
("CrossHairXY", "CrossHair", "CrossHairPoint"),
("DrawArcXY", "DrawArc", "DrawArcPoint"),
("DrawCheckMarkXY", "DrawCheckMark", "DrawCheckMarkRect"),
("DrawEllipticArcXY", "DrawEllipticArc", "DrawEllipticArcPointSize"),
("DrawPointXY", "DrawPoint", "DrawPointPoint"),
("DrawRectangleXY", "DrawRectangle", "DrawRectanglePointSize"),
("DrawRoundedRectangleXY", "DrawRoundedRectangle", "DrawRoundedRectanglePointSize"),
("DrawCircleXY", "DrawCircle", "DrawCirclePoint"),
("DrawEllipseXY", "DrawEllipse", "DrawEllipsePointSize"),
("DrawIconXY", "DrawIcon", "DrawIconPoint"),
("DrawBitmapXY", "DrawBitmap", "DrawBitmapPoint"),
("DrawTextXY", "DrawText", "DrawTextPoint"),
("DrawRotatedTextXY", "DrawRotatedText", "DrawRotatedTextPoint"),
("BlitXY", "Blit", "BlitPointSize"),