setBoundingBox for Pad

This commit is contained in:
Christophe Alexandre 2008-11-20 14:26:42 +00:00
parent 77e0872072
commit 92b3938f15
1 changed files with 21 additions and 1 deletions

View File

@ -55,13 +55,33 @@ extern "C" {
return ( (PyObject*)pyBox );
}
// ---------------------------------------------------------------
// Attribute Method : "PyPad_setBoudingBox()"
static PyObject* PyPad_setBoundingBox(PyPad *self, PyObject* args) {
trace << "Pad.setBoudingBox()" << endl;
HTRY
METHOD_HEAD ( "Pad.setBoudingBox()" )
PyBox* box;
if (!ParseOneArg("Pad.setBoundingBox", args, BOX_ARG, (PyObject**)&box)) {
return NULL;
}
pad->setBoundingBox(*PYBOX_O(box));
HCATCH
Py_RETURN_NONE;
}
// ---------------------------------------------------------------
// PyPad Attribute Method table.
PyMethodDef PyPad_Methods[] =
{ { "getX" , (PyCFunction)PyPad_getX , METH_NOARGS, "Return the Pad X value." }
, { "getY" , (PyCFunction)PyPad_getY , METH_NOARGS, "Return the Pad Y value." }
, { "getBoundingBox " , (PyCFunction)PyPad_getBoundingBox, METH_NOARGS, "Return the Pad Bounding Box." }
, { "getBoundingBox" , (PyCFunction)PyPad_getBoundingBox, METH_NOARGS, "Return the Pad Bounding Box." }
, { "setBoundingBox" , (PyCFunction)PyPad_setBoundingBox, METH_VARARGS, "Sets the Pad Bounding Box." }
, { "destroy" , (PyCFunction)PyPad_destroy , METH_NOARGS
, "Destroy associated hurricane object, the python object remains." }
, {NULL, NULL, 0, NULL} /* sentinel */