[TD]expose getScale() to Python
This commit is contained in:
@@ -20,6 +20,13 @@
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getScale">
|
||||
<Documentation>
|
||||
<UserDocu>float scale = getScale(). Returns the correct scale for this view. Handles whether to
|
||||
use this view's scale property or a parent's view (as in a projection group).
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<CustomAttributes />
|
||||
</PythonExport>
|
||||
</GenerateModel>
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user