From 89d1e2eeab15869685246c20dc260432ea548ea6 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 18 Dec 2006 23:15:37 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/_core.py | 3 +- wxPython/src/gtk/_core_wrap.cpp | 2 +- wxPython/src/gtk/_gdi.py | 4 +-- wxPython/src/gtk/_gdi_wrap.cpp | 54 +++++++++++++++++++++++---------- wxPython/src/mac/_core.py | 3 +- wxPython/src/mac/_core_wrap.cpp | 2 +- wxPython/src/mac/_gdi.py | 35 +++++++++++---------- wxPython/src/mac/_gdi_wrap.cpp | 54 +++++++++++++++++++++++---------- wxPython/src/msw/_core.py | 3 +- wxPython/src/msw/_core_wrap.cpp | 2 +- wxPython/src/msw/_gdi.py | 35 +++++++++++---------- wxPython/src/msw/_gdi_wrap.cpp | 54 +++++++++++++++++++++++---------- 12 files changed, 163 insertions(+), 88 deletions(-) diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index fe4aaa4a0d..489201d903 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -11036,13 +11036,14 @@ class MenuItem(Object): __repr__ = _swig_repr def __init__(self, *args, **kwargs): """ - __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString, + __init__(self, Menu parentMenu=None, int id=ID_SEPARATOR, String text=EmptyString, String help=EmptyString, int kind=ITEM_NORMAL, Menu subMenu=None) -> MenuItem """ _core_.MenuItem_swiginit(self,_core_.new_MenuItem(*args, **kwargs)) __swig_destroy__ = _core_.delete_MenuItem __del__ = lambda self : None; + def Destroy(self): pass def GetMenu(*args, **kwargs): """GetMenu(self) -> Menu""" return _core_.MenuItem_GetMenu(*args, **kwargs) diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index 289fcd7919..5a2bb6f53d 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -45647,7 +45647,7 @@ SWIGINTERN PyObject *MenuBar_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject * SWIGINTERN PyObject *_wrap_new_MenuItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxMenu *arg1 = (wxMenu *) NULL ; - int arg2 = (int) wxID_ANY ; + int arg2 = (int) wxID_SEPARATOR ; wxString const &arg3_defvalue = wxPyEmptyString ; wxString *arg3 = (wxString *) &arg3_defvalue ; wxString const &arg4_defvalue = wxPyEmptyString ; diff --git a/wxPython/src/gtk/_gdi.py b/wxPython/src/gtk/_gdi.py index bdfa5c6675..797eaa1ffe 100644 --- a/wxPython/src/gtk/_gdi.py +++ b/wxPython/src/gtk/_gdi.py @@ -5252,9 +5252,9 @@ class GraphicsPath(GraphicsObject): def AddArc(*args): """ AddArc(self, Double x, Double y, Double r, Double startAngle, Double endAngle, - bool clockwise) + bool clockwise=True) AddArc(self, Point2D c, Double r, Double startAngle, Double endAngle, - bool clockwise) + bool clockwise=True) Adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle diff --git a/wxPython/src/gtk/_gdi_wrap.cpp b/wxPython/src/gtk/_gdi_wrap.cpp index 963525294f..8fe3d463eb 100644 --- a/wxPython/src/gtk/_gdi_wrap.cpp +++ b/wxPython/src/gtk/_gdi_wrap.cpp @@ -26571,7 +26571,7 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_0(PyObject *SWIGUNUSEDPARM( wxDouble arg4 ; wxDouble arg5 ; wxDouble arg6 ; - bool arg7 ; + bool arg7 = (bool) true ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -26587,7 +26587,7 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_0(PyObject *SWIGUNUSEDPARM( bool val7 ; int ecode7 = 0 ; - if ((nobjs < 7) || (nobjs > 7)) SWIG_fail; + if ((nobjs < 6) || (nobjs > 7)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGraphicsPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GraphicsPath_AddArc" "', expected argument " "1"" of type '" "wxGraphicsPath *""'"); @@ -26618,11 +26618,13 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_0(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GraphicsPath_AddArc" "', expected argument " "6"" of type '" "wxDouble""'"); } arg6 = static_cast< wxDouble >(val6); - ecode7 = SWIG_AsVal_bool(swig_obj[6], &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "GraphicsPath_AddArc" "', expected argument " "7"" of type '" "bool""'"); - } - arg7 = static_cast< bool >(val7); + if (swig_obj[6]) { + ecode7 = SWIG_AsVal_bool(swig_obj[6], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "GraphicsPath_AddArc" "', expected argument " "7"" of type '" "bool""'"); + } + arg7 = static_cast< bool >(val7); + } { (arg1)->AddArc(arg2,arg3,arg4,arg5,arg6,arg7); if (PyErr_Occurred()) SWIG_fail; @@ -26641,7 +26643,7 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_1(PyObject *SWIGUNUSEDPARM( wxDouble arg3 ; wxDouble arg4 ; wxDouble arg5 ; - bool arg6 ; + bool arg6 = (bool) true ; void *argp1 = 0 ; int res1 = 0 ; wxPoint2D temp2 ; @@ -26654,7 +26656,7 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_1(PyObject *SWIGUNUSEDPARM( bool val6 ; int ecode6 = 0 ; - if ((nobjs < 6) || (nobjs > 6)) SWIG_fail; + if ((nobjs < 5) || (nobjs > 6)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGraphicsPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GraphicsPath_AddArc" "', expected argument " "1"" of type '" "wxGraphicsPath *""'"); @@ -26679,11 +26681,13 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_1(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "GraphicsPath_AddArc" "', expected argument " "5"" of type '" "wxDouble""'"); } arg5 = static_cast< wxDouble >(val5); - ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GraphicsPath_AddArc" "', expected argument " "6"" of type '" "bool""'"); - } - arg6 = static_cast< bool >(val6); + if (swig_obj[5]) { + ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GraphicsPath_AddArc" "', expected argument " "6"" of type '" "bool""'"); + } + arg6 = static_cast< bool >(val6); + } { (arg1)->AddArc((wxPoint2D const &)*arg2,arg3,arg4,arg5,arg6); if (PyErr_Occurred()) SWIG_fail; @@ -26701,10 +26705,28 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc(PyObject *self, PyObject *args) { if (!(argc = SWIG_Python_UnpackTuple(args,"GraphicsPath_AddArc",0,7,argv))) SWIG_fail; --argc; - if (argc == 6) { + if ((argc >= 5) && (argc <= 6)) { + int _v = 0; + { + { + _v = wxPySimple_typecheck(argv[1], wxT("wxPoint2D"), 2); + } + } + if (!_v) goto check_1; + if (argc > 5) { + { + { + int res = SWIG_AsVal_bool(argv[5], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + } return _wrap_GraphicsPath_AddArc__SWIG_1(self, argc, argv); } - if (argc == 7) { +check_1: + + if ((argc >= 6) && (argc <= 7)) { return _wrap_GraphicsPath_AddArc__SWIG_0(self, argc, argv); } diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index fe4aaa4a0d..489201d903 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -11036,13 +11036,14 @@ class MenuItem(Object): __repr__ = _swig_repr def __init__(self, *args, **kwargs): """ - __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString, + __init__(self, Menu parentMenu=None, int id=ID_SEPARATOR, String text=EmptyString, String help=EmptyString, int kind=ITEM_NORMAL, Menu subMenu=None) -> MenuItem """ _core_.MenuItem_swiginit(self,_core_.new_MenuItem(*args, **kwargs)) __swig_destroy__ = _core_.delete_MenuItem __del__ = lambda self : None; + def Destroy(self): pass def GetMenu(*args, **kwargs): """GetMenu(self) -> Menu""" return _core_.MenuItem_GetMenu(*args, **kwargs) diff --git a/wxPython/src/mac/_core_wrap.cpp b/wxPython/src/mac/_core_wrap.cpp index eef5117f7a..85e3e613af 100644 --- a/wxPython/src/mac/_core_wrap.cpp +++ b/wxPython/src/mac/_core_wrap.cpp @@ -45646,7 +45646,7 @@ SWIGINTERN PyObject *MenuBar_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject * SWIGINTERN PyObject *_wrap_new_MenuItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxMenu *arg1 = (wxMenu *) NULL ; - int arg2 = (int) wxID_ANY ; + int arg2 = (int) wxID_SEPARATOR ; wxString const &arg3_defvalue = wxPyEmptyString ; wxString *arg3 = (wxString *) &arg3_defvalue ; wxString const &arg4_defvalue = wxPyEmptyString ; diff --git a/wxPython/src/mac/_gdi.py b/wxPython/src/mac/_gdi.py index a869be86ea..d8122f0cd1 100644 --- a/wxPython/src/mac/_gdi.py +++ b/wxPython/src/mac/_gdi.py @@ -5148,7 +5148,8 @@ class GraphicsMatrix(GraphicsObject): """ IsEqual(self, GraphicsMatrix t) -> bool - Returns ``True`` if the elements of the transformation matrix are equal + Returns ``True`` if the elements of the transformation matrix are + equal """ return _gdi_.GraphicsMatrix_IsEqual(*args, **kwargs) @@ -5279,9 +5280,9 @@ class GraphicsPath(GraphicsObject): def AddArc(*args): """ AddArc(self, Double x, Double y, Double r, Double startAngle, Double endAngle, - bool clockwise) + bool clockwise=True) AddArc(self, Point2D c, Double r, Double startAngle, Double endAngle, - bool clockwise) + bool clockwise=True) Adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle @@ -5317,8 +5318,8 @@ class GraphicsPath(GraphicsObject): """ AddArcToPoint(self, Double x1, Double y1, Double x2, Double y2, Double r) - Appends an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) - to (x2,y2), also a straight line from (current) to (x1,y1) + Appends an arc to two tangents connecting (current) to (x1,y1) and + (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1) """ return _gdi_.GraphicsPath_AddArcToPoint(*args, **kwargs) @@ -5370,7 +5371,8 @@ class GraphicsPath(GraphicsObject): """ GetBox(self) -> Rect2D - Gets the bounding box enclosing all points (possibly including control points) + Gets the bounding box enclosing all points (possibly including control + points) """ return _gdi_.GraphicsPath_GetBox(*args, **kwargs) @@ -5425,9 +5427,9 @@ class GraphicsContext(GraphicsObject): """ CreateFromNative(void context) -> GraphicsContext - Creates a wx.GraphicsContext from a native context. This native context - must be eg a CGContextRef for Core Graphics, a Graphics pointer for - GDIPlus or a cairo_t pointer for Cairo. + Creates a wx.GraphicsContext from a native context. This native + context must be eg a CGContextRef for Core Graphics, a Graphics + pointer for GDIPlus or a cairo_t pointer for Cairo. """ return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs) @@ -5480,8 +5482,8 @@ class GraphicsContext(GraphicsObject): CreateRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius, Colour oColor, Colour cColor) -> GraphicsBrush - Creates a native brush, having a radial gradient originating at - point (xo,yc) with color oColour and ends on a circle around (xc,yc) with + Creates a native brush, having a radial gradient originating at point + (xo,yc) with color oColour and ends on a circle around (xc,yc) with radius r and color cColour. """ return _gdi_.GraphicsContext_CreateRadialGradientBrush(*args, **kwargs) @@ -5508,7 +5510,8 @@ class GraphicsContext(GraphicsObject): """ PushState(self) - push the current state of the context, ie the transformation matrix on a stack + Push the current state of the context, (ie the transformation matrix) + on a stack """ return _gdi_.GraphicsContext_PushState(*args, **kwargs) @@ -5516,7 +5519,7 @@ class GraphicsContext(GraphicsObject): """ PopState(self) - pops a stored state from the stack + Pops a stored state from the stack """ return _gdi_.GraphicsContext_PopState(*args, **kwargs) @@ -5833,9 +5836,9 @@ def GraphicsContext_CreateFromNative(*args, **kwargs): """ GraphicsContext_CreateFromNative(void context) -> GraphicsContext - Creates a wx.GraphicsContext from a native context. This native context - must be eg a CGContextRef for Core Graphics, a Graphics pointer for - GDIPlus or a cairo_t pointer for Cairo. + Creates a wx.GraphicsContext from a native context. This native + context must be eg a CGContextRef for Core Graphics, a Graphics + pointer for GDIPlus or a cairo_t pointer for Cairo. """ return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs) diff --git a/wxPython/src/mac/_gdi_wrap.cpp b/wxPython/src/mac/_gdi_wrap.cpp index 69d498626f..887093dd96 100644 --- a/wxPython/src/mac/_gdi_wrap.cpp +++ b/wxPython/src/mac/_gdi_wrap.cpp @@ -26780,7 +26780,7 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_0(PyObject *SWIGUNUSEDPARM( wxDouble arg4 ; wxDouble arg5 ; wxDouble arg6 ; - bool arg7 ; + bool arg7 = (bool) true ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -26796,7 +26796,7 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_0(PyObject *SWIGUNUSEDPARM( bool val7 ; int ecode7 = 0 ; - if ((nobjs < 7) || (nobjs > 7)) SWIG_fail; + if ((nobjs < 6) || (nobjs > 7)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGraphicsPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GraphicsPath_AddArc" "', expected argument " "1"" of type '" "wxGraphicsPath *""'"); @@ -26827,11 +26827,13 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_0(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GraphicsPath_AddArc" "', expected argument " "6"" of type '" "wxDouble""'"); } arg6 = static_cast< wxDouble >(val6); - ecode7 = SWIG_AsVal_bool(swig_obj[6], &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "GraphicsPath_AddArc" "', expected argument " "7"" of type '" "bool""'"); - } - arg7 = static_cast< bool >(val7); + if (swig_obj[6]) { + ecode7 = SWIG_AsVal_bool(swig_obj[6], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "GraphicsPath_AddArc" "', expected argument " "7"" of type '" "bool""'"); + } + arg7 = static_cast< bool >(val7); + } { (arg1)->AddArc(arg2,arg3,arg4,arg5,arg6,arg7); if (PyErr_Occurred()) SWIG_fail; @@ -26850,7 +26852,7 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_1(PyObject *SWIGUNUSEDPARM( wxDouble arg3 ; wxDouble arg4 ; wxDouble arg5 ; - bool arg6 ; + bool arg6 = (bool) true ; void *argp1 = 0 ; int res1 = 0 ; wxPoint2D temp2 ; @@ -26863,7 +26865,7 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_1(PyObject *SWIGUNUSEDPARM( bool val6 ; int ecode6 = 0 ; - if ((nobjs < 6) || (nobjs > 6)) SWIG_fail; + if ((nobjs < 5) || (nobjs > 6)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGraphicsPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GraphicsPath_AddArc" "', expected argument " "1"" of type '" "wxGraphicsPath *""'"); @@ -26888,11 +26890,13 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_1(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "GraphicsPath_AddArc" "', expected argument " "5"" of type '" "wxDouble""'"); } arg5 = static_cast< wxDouble >(val5); - ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GraphicsPath_AddArc" "', expected argument " "6"" of type '" "bool""'"); - } - arg6 = static_cast< bool >(val6); + if (swig_obj[5]) { + ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GraphicsPath_AddArc" "', expected argument " "6"" of type '" "bool""'"); + } + arg6 = static_cast< bool >(val6); + } { (arg1)->AddArc((wxPoint2D const &)*arg2,arg3,arg4,arg5,arg6); if (PyErr_Occurred()) SWIG_fail; @@ -26910,10 +26914,28 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc(PyObject *self, PyObject *args) { if (!(argc = SWIG_Python_UnpackTuple(args,"GraphicsPath_AddArc",0,7,argv))) SWIG_fail; --argc; - if (argc == 6) { + if ((argc >= 5) && (argc <= 6)) { + int _v = 0; + { + { + _v = wxPySimple_typecheck(argv[1], wxT("wxPoint2D"), 2); + } + } + if (!_v) goto check_1; + if (argc > 5) { + { + { + int res = SWIG_AsVal_bool(argv[5], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + } return _wrap_GraphicsPath_AddArc__SWIG_1(self, argc, argv); } - if (argc == 7) { +check_1: + + if ((argc >= 6) && (argc <= 7)) { return _wrap_GraphicsPath_AddArc__SWIG_0(self, argc, argv); } diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index 982503e939..9f0ead8bce 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -11040,13 +11040,14 @@ class MenuItem(Object): __repr__ = _swig_repr def __init__(self, *args, **kwargs): """ - __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString, + __init__(self, Menu parentMenu=None, int id=ID_SEPARATOR, String text=EmptyString, String help=EmptyString, int kind=ITEM_NORMAL, Menu subMenu=None) -> MenuItem """ _core_.MenuItem_swiginit(self,_core_.new_MenuItem(*args, **kwargs)) __swig_destroy__ = _core_.delete_MenuItem __del__ = lambda self : None; + def Destroy(self): pass def GetMenu(*args, **kwargs): """GetMenu(self) -> Menu""" return _core_.MenuItem_GetMenu(*args, **kwargs) diff --git a/wxPython/src/msw/_core_wrap.cpp b/wxPython/src/msw/_core_wrap.cpp index f6942a7b45..54783f1237 100644 --- a/wxPython/src/msw/_core_wrap.cpp +++ b/wxPython/src/msw/_core_wrap.cpp @@ -45672,7 +45672,7 @@ SWIGINTERN PyObject *MenuBar_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject * SWIGINTERN PyObject *_wrap_new_MenuItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxMenu *arg1 = (wxMenu *) NULL ; - int arg2 = (int) wxID_ANY ; + int arg2 = (int) wxID_SEPARATOR ; wxString const &arg3_defvalue = wxPyEmptyString ; wxString *arg3 = (wxString *) &arg3_defvalue ; wxString const &arg4_defvalue = wxPyEmptyString ; diff --git a/wxPython/src/msw/_gdi.py b/wxPython/src/msw/_gdi.py index 8d32f4ed97..c7584d571a 100644 --- a/wxPython/src/msw/_gdi.py +++ b/wxPython/src/msw/_gdi.py @@ -5246,7 +5246,8 @@ class GraphicsMatrix(GraphicsObject): """ IsEqual(self, GraphicsMatrix t) -> bool - Returns ``True`` if the elements of the transformation matrix are equal + Returns ``True`` if the elements of the transformation matrix are + equal """ return _gdi_.GraphicsMatrix_IsEqual(*args, **kwargs) @@ -5377,9 +5378,9 @@ class GraphicsPath(GraphicsObject): def AddArc(*args): """ AddArc(self, Double x, Double y, Double r, Double startAngle, Double endAngle, - bool clockwise) + bool clockwise=True) AddArc(self, Point2D c, Double r, Double startAngle, Double endAngle, - bool clockwise) + bool clockwise=True) Adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle @@ -5415,8 +5416,8 @@ class GraphicsPath(GraphicsObject): """ AddArcToPoint(self, Double x1, Double y1, Double x2, Double y2, Double r) - Appends an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) - to (x2,y2), also a straight line from (current) to (x1,y1) + Appends an arc to two tangents connecting (current) to (x1,y1) and + (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1) """ return _gdi_.GraphicsPath_AddArcToPoint(*args, **kwargs) @@ -5468,7 +5469,8 @@ class GraphicsPath(GraphicsObject): """ GetBox(self) -> Rect2D - Gets the bounding box enclosing all points (possibly including control points) + Gets the bounding box enclosing all points (possibly including control + points) """ return _gdi_.GraphicsPath_GetBox(*args, **kwargs) @@ -5523,9 +5525,9 @@ class GraphicsContext(GraphicsObject): """ CreateFromNative(void context) -> GraphicsContext - Creates a wx.GraphicsContext from a native context. This native context - must be eg a CGContextRef for Core Graphics, a Graphics pointer for - GDIPlus or a cairo_t pointer for Cairo. + Creates a wx.GraphicsContext from a native context. This native + context must be eg a CGContextRef for Core Graphics, a Graphics + pointer for GDIPlus or a cairo_t pointer for Cairo. """ return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs) @@ -5578,8 +5580,8 @@ class GraphicsContext(GraphicsObject): CreateRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius, Colour oColor, Colour cColor) -> GraphicsBrush - Creates a native brush, having a radial gradient originating at - point (xo,yc) with color oColour and ends on a circle around (xc,yc) with + Creates a native brush, having a radial gradient originating at point + (xo,yc) with color oColour and ends on a circle around (xc,yc) with radius r and color cColour. """ return _gdi_.GraphicsContext_CreateRadialGradientBrush(*args, **kwargs) @@ -5606,7 +5608,8 @@ class GraphicsContext(GraphicsObject): """ PushState(self) - push the current state of the context, ie the transformation matrix on a stack + Push the current state of the context, (ie the transformation matrix) + on a stack """ return _gdi_.GraphicsContext_PushState(*args, **kwargs) @@ -5614,7 +5617,7 @@ class GraphicsContext(GraphicsObject): """ PopState(self) - pops a stored state from the stack + Pops a stored state from the stack """ return _gdi_.GraphicsContext_PopState(*args, **kwargs) @@ -5931,9 +5934,9 @@ def GraphicsContext_CreateFromNative(*args, **kwargs): """ GraphicsContext_CreateFromNative(void context) -> GraphicsContext - Creates a wx.GraphicsContext from a native context. This native context - must be eg a CGContextRef for Core Graphics, a Graphics pointer for - GDIPlus or a cairo_t pointer for Cairo. + Creates a wx.GraphicsContext from a native context. This native + context must be eg a CGContextRef for Core Graphics, a Graphics + pointer for GDIPlus or a cairo_t pointer for Cairo. """ return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs) diff --git a/wxPython/src/msw/_gdi_wrap.cpp b/wxPython/src/msw/_gdi_wrap.cpp index cdede70071..09411f87ab 100644 --- a/wxPython/src/msw/_gdi_wrap.cpp +++ b/wxPython/src/msw/_gdi_wrap.cpp @@ -27520,7 +27520,7 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_0(PyObject *SWIGUNUSEDPARM( wxDouble arg4 ; wxDouble arg5 ; wxDouble arg6 ; - bool arg7 ; + bool arg7 = (bool) true ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -27536,7 +27536,7 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_0(PyObject *SWIGUNUSEDPARM( bool val7 ; int ecode7 = 0 ; - if ((nobjs < 7) || (nobjs > 7)) SWIG_fail; + if ((nobjs < 6) || (nobjs > 7)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGraphicsPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GraphicsPath_AddArc" "', expected argument " "1"" of type '" "wxGraphicsPath *""'"); @@ -27567,11 +27567,13 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_0(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GraphicsPath_AddArc" "', expected argument " "6"" of type '" "wxDouble""'"); } arg6 = static_cast< wxDouble >(val6); - ecode7 = SWIG_AsVal_bool(swig_obj[6], &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "GraphicsPath_AddArc" "', expected argument " "7"" of type '" "bool""'"); - } - arg7 = static_cast< bool >(val7); + if (swig_obj[6]) { + ecode7 = SWIG_AsVal_bool(swig_obj[6], &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "GraphicsPath_AddArc" "', expected argument " "7"" of type '" "bool""'"); + } + arg7 = static_cast< bool >(val7); + } { (arg1)->AddArc(arg2,arg3,arg4,arg5,arg6,arg7); if (PyErr_Occurred()) SWIG_fail; @@ -27590,7 +27592,7 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_1(PyObject *SWIGUNUSEDPARM( wxDouble arg3 ; wxDouble arg4 ; wxDouble arg5 ; - bool arg6 ; + bool arg6 = (bool) true ; void *argp1 = 0 ; int res1 = 0 ; wxPoint2D temp2 ; @@ -27603,7 +27605,7 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_1(PyObject *SWIGUNUSEDPARM( bool val6 ; int ecode6 = 0 ; - if ((nobjs < 6) || (nobjs > 6)) SWIG_fail; + if ((nobjs < 5) || (nobjs > 6)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxGraphicsPath, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GraphicsPath_AddArc" "', expected argument " "1"" of type '" "wxGraphicsPath *""'"); @@ -27628,11 +27630,13 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc__SWIG_1(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "GraphicsPath_AddArc" "', expected argument " "5"" of type '" "wxDouble""'"); } arg5 = static_cast< wxDouble >(val5); - ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GraphicsPath_AddArc" "', expected argument " "6"" of type '" "bool""'"); - } - arg6 = static_cast< bool >(val6); + if (swig_obj[5]) { + ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GraphicsPath_AddArc" "', expected argument " "6"" of type '" "bool""'"); + } + arg6 = static_cast< bool >(val6); + } { (arg1)->AddArc((wxPoint2D const &)*arg2,arg3,arg4,arg5,arg6); if (PyErr_Occurred()) SWIG_fail; @@ -27650,10 +27654,28 @@ SWIGINTERN PyObject *_wrap_GraphicsPath_AddArc(PyObject *self, PyObject *args) { if (!(argc = SWIG_Python_UnpackTuple(args,"GraphicsPath_AddArc",0,7,argv))) SWIG_fail; --argc; - if (argc == 6) { + if ((argc >= 5) && (argc <= 6)) { + int _v = 0; + { + { + _v = wxPySimple_typecheck(argv[1], wxT("wxPoint2D"), 2); + } + } + if (!_v) goto check_1; + if (argc > 5) { + { + { + int res = SWIG_AsVal_bool(argv[5], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + } return _wrap_GraphicsPath_AddArc__SWIG_1(self, argc, argv); } - if (argc == 7) { +check_1: + + if ((argc >= 6) && (argc <= 7)) { return _wrap_GraphicsPath_AddArc__SWIG_0(self, argc, argv); } -- 2.45.2