From bab3b70c5c083d0c50f6948f22e66665cc9635a7 Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Thu, 11 Dec 2003 13:01:50 +0000 Subject: [PATCH] set font in reaction path diagrams --- Cantera/python/Cantera/rxnpath.py | 2 ++ Cantera/python/src/ctrpath_methods.cpp | 12 ++++++++++++ Cantera/python/src/methods.h | 1 + 3 files changed, 15 insertions(+) diff --git a/Cantera/python/Cantera/rxnpath.py b/Cantera/python/Cantera/rxnpath.py index 4d2a252bc..a3c300727 100755 --- a/Cantera/python/Cantera/rxnpath.py +++ b/Cantera/python/Cantera/rxnpath.py @@ -110,6 +110,8 @@ class PathDiagram: _cantera.rdiag_setNormalThreshold(self.__rdiag_id, v) elif o == "label_threshold": _cantera.rdiag_setLabelThreshold(self.__rdiag_id, v) + elif o == "font": + _cantera.rdiag_setFont(self.__rdiag_id, v) elif o == "flow_type": if v == "one_way": _cantera.rdiag_setFlowType(self.__rdiag_id, 0) diff --git a/Cantera/python/src/ctrpath_methods.cpp b/Cantera/python/src/ctrpath_methods.cpp index 86099af92..46b318bf7 100644 --- a/Cantera/python/src/ctrpath_methods.cpp +++ b/Cantera/python/src/ctrpath_methods.cpp @@ -52,6 +52,18 @@ py_rdiag_setThreshold(PyObject *self, PyObject *args) return Py_BuildValue("i",0); } +static PyObject* +py_rdiag_setFont(PyObject *self, PyObject *args) +{ + int n; + char* font; + if (!PyArg_ParseTuple(args, "is:rdiag_setFont", &n, &font)) + return NULL; + int iok = rdiag_setFont(n, font); + if (iok < 0) return reportError(iok); + return Py_BuildValue("i",0); +} + static PyObject* py_rdiag_setBoldColor(PyObject *self, PyObject *args) { diff --git a/Cantera/python/src/methods.h b/Cantera/python/src/methods.h index 731af7c68..420e2100d 100644 --- a/Cantera/python/src/methods.h +++ b/Cantera/python/src/methods.h @@ -165,6 +165,7 @@ static PyMethodDef ct_methods[] = { {"rdiag_displayOnly", py_rdiag_displayOnly, METH_VARARGS}, {"rdiag_setThreshold", py_rdiag_setThreshold, METH_VARARGS}, {"rdiag_setBoldThreshold", py_rdiag_setBoldThreshold, METH_VARARGS}, + {"rdiag_setFont", py_rdiag_setFont, METH_VARARGS}, {"rdiag_new", py_rdiag_new, METH_VARARGS}, {"rdiag_del", py_rdiag_del, METH_VARARGS}, {"rdiag_detailed", py_rdiag_detailed, METH_VARARGS},