From 92b3938f155a7dcaaa74af611027d6af9a9a5bbe Mon Sep 17 00:00:00 2001 From: Christophe Alexandre Date: Thu, 20 Nov 2008 14:26:42 +0000 Subject: [PATCH] setBoundingBox for Pad --- hurricane/src/isobar/PyPad.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/hurricane/src/isobar/PyPad.cpp b/hurricane/src/isobar/PyPad.cpp index fff8aa1e..bd8401e3 100644 --- a/hurricane/src/isobar/PyPad.cpp +++ b/hurricane/src/isobar/PyPad.cpp @@ -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 */