Fixed GetPoints. Since wxRealPoint is not an wxObject I can't use the
helper function here. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -5635,7 +5635,21 @@ static PyObject *_wrap_wxPyPolygonShape_DeletePolygonPoint(PyObject *self, PyObj
|
||||
|
||||
static PyObject * wxPyPolygonShape_GetPoints(wxPyPolygonShape *self) {
|
||||
wxList* list = self->GetPoints();
|
||||
return wxPy_ConvertList(list, "wxRealPoint");
|
||||
PyObject* pyList;
|
||||
PyObject* pyObj;
|
||||
wxObject* wxObj;
|
||||
wxNode* node = list->GetFirst();
|
||||
|
||||
wxPyBeginBlockThreads();
|
||||
pyList = PyList_New(0);
|
||||
while (node) {
|
||||
wxObj = node->GetData();
|
||||
pyObj = wxPyConstructObject(wxObj, wxT("wxRealPoint"), 0);
|
||||
PyList_Append(pyList, pyObj);
|
||||
node = node->GetNext();
|
||||
}
|
||||
wxPyEndBlockThreads();
|
||||
return pyList;
|
||||
}
|
||||
static PyObject *_wrap_wxPyPolygonShape_GetPoints(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
|
@@ -303,13 +303,26 @@ public:
|
||||
%addmethods {
|
||||
PyObject* GetPoints() {
|
||||
wxList* list = self->GetPoints();
|
||||
return wxPy_ConvertList(list, "wxRealPoint");
|
||||
PyObject* pyList;
|
||||
PyObject* pyObj;
|
||||
wxObject* wxObj;
|
||||
wxNode* node = list->GetFirst();
|
||||
|
||||
wxPyBeginBlockThreads();
|
||||
pyList = PyList_New(0);
|
||||
while (node) {
|
||||
wxObj = node->GetData();
|
||||
pyObj = wxPyConstructObject(wxObj, wxT("wxRealPoint"), 0);
|
||||
PyList_Append(pyList, pyObj);
|
||||
node = node->GetNext();
|
||||
}
|
||||
wxPyEndBlockThreads();
|
||||
return pyList;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateOriginalPoints();
|
||||
|
||||
|
||||
void base_OnDraw(wxDC& dc);
|
||||
void base_OnDrawContents(wxDC& dc);
|
||||
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
|
||||
|
Reference in New Issue
Block a user