Prep for wxPython 2.1b3 release
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -68,8 +68,24 @@ public:
|
||||
double y;
|
||||
wxRealPoint(double x=0.0, double y=0.0);
|
||||
~wxRealPoint();
|
||||
|
||||
%addmethods {
|
||||
void Set(double x, double y) {
|
||||
self->x = x;
|
||||
self->y = y;
|
||||
}
|
||||
PyObject* asTuple() {
|
||||
PyObject* tup = PyTuple_New(2);
|
||||
PyTuple_SET_ITEM(tup, 0, PyFloat_FromDouble(self->x));
|
||||
PyTuple_SET_ITEM(tup, 1, PyFloat_FromDouble(self->y));
|
||||
return tup;
|
||||
}
|
||||
}
|
||||
%pragma(python) addtoclass = "def __str__(self): return str(self.asTuple())"
|
||||
%pragma(python) addtoclass = "def __repr__(self): return str(self.asTuple())"
|
||||
};
|
||||
|
||||
|
||||
class wxPoint {
|
||||
public:
|
||||
long x;
|
||||
|
Reference in New Issue
Block a user