43 self = Py_BuildValue(
"i",
c);
70 self = Py_BuildValue(
"i", other);
79 ret = PyObject_CallMethodObjArgs(
self, Py_BuildValue(
"s",
"__neg__"), NULL);
93 ret = PyObject_CallMethodObjArgs(
self, Py_BuildValue(
"s", method.c_str()), other, NULL);
98 PyObject * isNI = PyObject_RichCompare(ret, Py_NotImplemented, Py_EQ);
99 if ( PyInt_AsLong(isNI) ){
100 ret = PyObject_CallMethodObjArgs(other, Py_BuildValue(
"s", rmethod.c_str()),
self, NULL);
124 PyObject* other_obj = Py_BuildValue(
"i", other);
132 PyObject* other_obj = Py_BuildValue(
"i", other);
133 Py_INCREF(other_obj);
135 Py_DECREF(other_obj);
142 ret = PyObject_RichCompare(
self, other.
getObj(), op);
143 retv = PyInt_AsLong(ret);
190 *
this = *
this + other;
196 *
this = *
this - other;
227 boost::equality_comparable<
PyRect
Adaptor that creates 2D functions from 1D ones.
A range of numbers which is never empty.
A range of numbers that can be empty.
Axis-aligned generic rectangle that can be empty.
Axis aligned, non-empty, generic rectangle.
WrappedPyObject operator*(WrappedPyObject const other)
bool operator>=(WrappedPyObject const &other) const
WrappedPyObject operator*(int other)
bool operator>=(int const c) const
bool richcmp(WrappedPyObject const &other, int op) const
WrappedPyObject operator-(WrappedPyObject const other)
bool operator<=(WrappedPyObject const &other) const
WrappedPyObject arithmetic(PyObject *const other, std::string method, std::string rmethod) const
WrappedPyObject operator+=(WrappedPyObject other)
bool operator<(int const c) const
bool operator<=(int const c) const
WrappedPyObject operator=(WrappedPyObject other)
WrappedPyObject operator/(int other)
WrappedPyObject(WrappedPyObject const &other)
WrappedPyObject(PyObject *arg)
PyObject * getObj() const
WrappedPyObject operator=(int other)
WrappedPyObject operator+(WrappedPyObject const other) const
bool operator==(int const c) const
bool operator>(int const c) const
bool operator<(WrappedPyObject const &other) const
WrappedPyObject operator-=(WrappedPyObject other)
bool operator>(WrappedPyObject const &other) const
WrappedPyObject operator-() const
bool operator==(WrappedPyObject const &other) const
Lifts one dimensional objects into 2D.
Closed interval of generic values.
Various utility functions.
GenericRect< WrappedPyObject > PyRect
GenericOptRect< WrappedPyObject > PyOptRect
GenericInterval< WrappedPyObject > PyInterval
D2< WrappedPyObject > PyPoint
GenericOptInterval< WrappedPyObject > PyOptInterval
boost::equality_comparable< PyInterval, boost::additive< PyInterval, boost::multipliable< PyInterval, boost::orable< PyInterval, boost::arithmetic< PyInterval, WrappedPyObject > > > > > IntervalOps
PyOptInterval OptIntervalType
boost::equality_comparable< PyRect, boost::orable< PyRect, boost::orable< PyRect, PyOptRect, boost::additive< PyRect, PyPoint > > > > RectOps
Traits class used with coordinate types.