class wxPyEllipseShape : public wxPyShape {
public:
- %addtofunc wxPyEllipseShape "self._setOORandCallbackInfo(PyEllipseShape)"
+ %pythonAppend wxPyEllipseShape "self._setOORandCallbackInfo(PyEllipseShape)"
wxPyEllipseShape(double width = 0.0, double height = 0.0);
class wxPyCircleShape : public wxPyEllipseShape {
public:
- %addtofunc wxPyCircleShape "self._setOORandCallbackInfo(PyCircleShape)"
+ %pythonAppend wxPyCircleShape "self._setOORandCallbackInfo(PyCircleShape)"
wxPyCircleShape(double width = 0.0);
class wxPyLineShape : public wxPyShape {
public:
- %addtofunc wxPyLineShape "self._setOORandCallbackInfo(PyLineShape)"
+ %pythonAppend wxPyLineShape "self._setOORandCallbackInfo(PyLineShape)"
wxPyLineShape();
%extend {
PyObject* GetLineControlPoints() {
wxList* list = self->GetLineControlPoints();
- return wxPy_ConvertShapeList(list);
+ return wxPy_ConvertRealPointList(list);
+ }
+
+ // part of Patch# 893337
+ void SetLineControlPoints(PyObject* list) {
+ wxList* real_point_list = wxPy_wxRealPoint_ListHelper(list);
+ self->MakeLineControlPoints((int)(real_point_list->GetCount()));
+ wxList* old_control_points = self->GetLineControlPoints();
+ wxNode* old_node = old_control_points->GetFirst();
+ wxNode* real_node = real_point_list->GetFirst();
+ while(old_node)
+ {
+ wxRealPoint* old_point = (wxRealPoint*)old_node->GetData();
+ wxRealPoint* new_point = (wxRealPoint*)real_node->GetData();
+ old_point->x = new_point->x;
+ old_point->y = new_point->y;
+ old_node = old_node->GetNext();
+ real_node = real_node->GetNext();
+ }
+ self->ClearPointList(*real_point_list);
+ delete real_point_list;
}
}
void Unlink();
+ void SetAlignmentOrientation(bool isEnd, bool isHoriz);
+ void SetAlignmentType(bool isEnd, int alignType);
+ bool GetAlignmentOrientation(bool isEnd);
+ int GetAlignmentType(bool isEnd);
+ int GetAlignmentStart() const;
+ int GetAlignmentEnd() const;
+
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
class wxPyPolygonShape : public wxPyShape {
public:
- %addtofunc wxPyPolygonShape "self._setOORandCallbackInfo(PyPolygonShape)"
+ %pythonAppend wxPyPolygonShape "self._setOORandCallbackInfo(PyPolygonShape)"
wxPyPolygonShape();
%extend {
PyObject* GetPoints() {
wxList* list = self->GetPoints();
+ return wxPy_ConvertRealPointList(list);
+ }
+
+ PyObject* GetOriginalPoints() {
+ wxList* list = self->GetOriginalPoints();
PyObject* pyList;
PyObject* pyObj;
wxObject* wxObj;
wxNode* node = list->GetFirst();
- wxPyBeginBlockThreads();
+ bool blocked = wxPyBeginBlockThreads();
pyList = PyList_New(0);
while (node) {
wxObj = node->GetData();
PyList_Append(pyList, pyObj);
node = node->GetNext();
}
- wxPyEndBlockThreads();
+ wxPyEndBlockThreads(blocked);
return pyList;
- }
+ }
}
+ double GetOriginalWidth() const;
+ double GetOriginalHeight() const;
+
+ void SetOriginalWidth(double w);
+ void SetOriginalHeight(double h);
+
void UpdateOriginalPoints();
void base_OnDraw(wxDC& dc);
class wxPyTextShape : public wxPyRectangleShape {
public:
- %addtofunc wxPyTextShape "self._setOORandCallbackInfo(PyTextShape)"
+ %pythonAppend wxPyTextShape "self._setOORandCallbackInfo(PyTextShape)"
wxPyTextShape(double width = 0.0, double height = 0.0);