[TD]expose getScale() to Python

This commit is contained in:
wandererfan
2024-03-12 19:17:39 -04:00
committed by WandererFan
parent ab3296b124
commit 91350aad36
2 changed files with 20 additions and 0 deletions

View File

@@ -78,6 +78,19 @@ PyObject* DrawViewPy::translateLabel(PyObject *args)
Py_Return;
}
//! return the correct scale for this view
PyObject* DrawViewPy::getScale(PyObject *args)
{
if (!PyArg_ParseTuple(args, "")) {
throw Py::TypeError("Do not understand passed parameter.");
}
DrawView* dv = getDrawViewPtr();
return PyFloat_FromDouble(dv->getScale());
}
PyObject *DrawViewPy::getCustomAttributes(const char* /*attr*/) const
{