SWIGged updates for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -7623,6 +7623,8 @@ static PyObject *_wrap_wxDC_GetBoundingBox(PyObject *self, PyObject *args, PyObj
|
||||
}
|
||||
|
||||
static PyObject * wxDC__DrawPointList(wxDC *self,PyObject * pyPoints,PyObject * pyPens) {
|
||||
wxPyBeginBlockThreads();
|
||||
|
||||
bool isFastSeq = PyList_Check(pyPoints) || PyTuple_Check(pyPoints);
|
||||
bool isFastPens = PyList_Check(pyPens) || PyTuple_Check(pyPens);
|
||||
int numObjs = 0;
|
||||
@@ -7631,6 +7633,7 @@ static PyObject * wxDC__DrawPointList(wxDC *self,PyObject * pyPoints,PyObject *
|
||||
PyObject* obj;
|
||||
int x1, y1;
|
||||
int i = 0;
|
||||
PyObject* retval;
|
||||
|
||||
if (!PySequence_Check(pyPoints)) {
|
||||
goto err0;
|
||||
@@ -7673,6 +7676,13 @@ static PyObject * wxDC__DrawPointList(wxDC *self,PyObject * pyPoints,PyObject *
|
||||
Py_DECREF(obj);
|
||||
goto err0;
|
||||
}
|
||||
if (PyErr_Occurred()) {
|
||||
retval = NULL;
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
// Now draw the point
|
||||
self->DrawPoint(x1, y1);
|
||||
@@ -7682,14 +7692,21 @@ static PyObject * wxDC__DrawPointList(wxDC *self,PyObject * pyPoints,PyObject *
|
||||
}
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
retval = Py_None;
|
||||
goto exit;
|
||||
|
||||
err1:
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a sequence of wxPens");
|
||||
return NULL;
|
||||
retval = NULL;
|
||||
goto exit;
|
||||
err0:
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y) sequences.");
|
||||
return NULL;
|
||||
retval = NULL;
|
||||
goto exit;
|
||||
|
||||
exit:
|
||||
wxPyEndBlockThreads();
|
||||
return retval;
|
||||
}
|
||||
static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -7731,6 +7748,8 @@ static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObj
|
||||
}
|
||||
|
||||
static PyObject * wxDC__DrawLineList(wxDC *self,PyObject * pyLines,PyObject * pyPens) {
|
||||
wxPyBeginBlockThreads();
|
||||
|
||||
bool isFastSeq = PyList_Check(pyLines) || PyTuple_Check(pyLines);
|
||||
bool isFastPens = PyList_Check(pyPens) || PyTuple_Check(pyPens);
|
||||
int numObjs = 0;
|
||||
@@ -7739,6 +7758,7 @@ static PyObject * wxDC__DrawLineList(wxDC *self,PyObject * pyLines,PyObject * py
|
||||
PyObject* obj;
|
||||
int x1, y1, x2, y2;
|
||||
int i = 0;
|
||||
PyObject* retval;
|
||||
|
||||
if (!PySequence_Check(pyLines)) {
|
||||
goto err0;
|
||||
@@ -7781,6 +7801,12 @@ static PyObject * wxDC__DrawLineList(wxDC *self,PyObject * pyLines,PyObject * py
|
||||
Py_DECREF(obj);
|
||||
goto err0;
|
||||
}
|
||||
if (PyErr_Occurred()) {
|
||||
retval = NULL;
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
// Now draw the line
|
||||
self->DrawLine(x1, y1, x2, y2);
|
||||
@@ -7790,14 +7816,22 @@ static PyObject * wxDC__DrawLineList(wxDC *self,PyObject * pyLines,PyObject * py
|
||||
}
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
retval = Py_None;
|
||||
goto exit;
|
||||
|
||||
err1:
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a sequence of wxPens");
|
||||
return NULL;
|
||||
retval = NULL;
|
||||
goto exit;
|
||||
|
||||
err0:
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x1,y1, x2,y2) sequences.");
|
||||
return NULL;
|
||||
retval = NULL;
|
||||
goto exit;
|
||||
|
||||
exit:
|
||||
wxPyEndBlockThreads();
|
||||
return retval;
|
||||
}
|
||||
static PyObject *_wrap_wxDC__DrawLineList(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
|
Reference in New Issue
Block a user