// python wrapper for vtkQtLabelRenderStrategy // #define VTK_WRAPPING_CXX #define VTK_STREAMS_FWD_ONLY #include "vtkPythonArgs.h" #include "vtkPythonOverload.h" #include "vtkConfigure.h" #include #include #include "vtkVariant.h" #include "vtkIndent.h" #include "vtkStdString.h" #include "vtkUnicodeString.h" #include "vtkQtLabelRenderStrategy.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkQtLabelRenderStrategy(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkQtLabelRenderStrategy_ClassNew(); } #ifndef DECLARED_PyvtkLabelRenderStrategy_ClassNew extern "C" { PyObject *PyvtkLabelRenderStrategy_ClassNew(); } #define DECLARED_PyvtkLabelRenderStrategy_ClassNew #endif static const char *PyvtkQtLabelRenderStrategy_Doc = "vtkQtLabelRenderStrategy - Renders labels with Qt\n\n" "Superclass: vtkLabelRenderStrategy\n\n" "This class uses Qt to render labels and compute sizes. The labels are\n" "rendered to a QImage, then EndFrame() converts that image to a\n" "vtkImageData and textures the image onto a quad spanning the render\n" "area.\n\n"; static PyObject * PyvtkQtLabelRenderStrategy_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkQtLabelRenderStrategy::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkQtLabelRenderStrategy_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkQtLabelRenderStrategy *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = (ap.IsBound() ? op->IsA(temp0) : op->vtkQtLabelRenderStrategy::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkQtLabelRenderStrategy_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkQtLabelRenderStrategy *tempr = vtkQtLabelRenderStrategy::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkQtLabelRenderStrategy_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkQtLabelRenderStrategy *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkQtLabelRenderStrategy *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkQtLabelRenderStrategy::NewInstance()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); if (result && PyVTKObject_Check(result)) { PyVTKObject_GetObject(result)->UnRegister(0); PyVTKObject_SetFlag(result, VTK_PYTHON_IGNORE_UNREGISTER, 1); } } } return result; } static PyObject * PyvtkQtLabelRenderStrategy_ComputeLabelBounds_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ComputeLabelBounds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkQtLabelRenderStrategy *op = static_cast(vp); vtkTextProperty *temp0 = nullptr; vtkStdString temp1; const int size2 = 4; double temp2[4]; double save2[4]; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetVTKObject(temp0, "vtkTextProperty") && ap.GetValue(temp1) && ap.GetArray(temp2, size2)) { ap.SaveArray(temp2, save2, size2); if (ap.IsBound()) { op->ComputeLabelBounds(temp0, temp1, temp2); } else { op->vtkQtLabelRenderStrategy::ComputeLabelBounds(temp0, temp1, temp2); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkQtLabelRenderStrategy_ComputeLabelBounds_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ComputeLabelBounds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkQtLabelRenderStrategy *op = static_cast(vp); vtkTextProperty *temp0 = nullptr; vtkUnicodeString temp1; const int size2 = 4; double temp2[4]; double save2[4]; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetVTKObject(temp0, "vtkTextProperty") && ap.GetValue(temp1) && ap.GetArray(temp2, size2)) { ap.SaveArray(temp2, save2, size2); if (ap.IsBound()) { op->ComputeLabelBounds(temp0, temp1, temp2); } else { op->vtkQtLabelRenderStrategy::ComputeLabelBounds(temp0, temp1, temp2); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkQtLabelRenderStrategy_ComputeLabelBounds_Methods[] = { {nullptr, PyvtkQtLabelRenderStrategy_ComputeLabelBounds_s1, METH_VARARGS, "@VsP *vtkTextProperty *d"}, {nullptr, PyvtkQtLabelRenderStrategy_ComputeLabelBounds_s2, METH_VARARGS, "@VuP *vtkTextProperty *d"}, {nullptr, nullptr, 0, nullptr} }; static PyObject * PyvtkQtLabelRenderStrategy_ComputeLabelBounds(PyObject *self, PyObject *args) { PyMethodDef *methods = PyvtkQtLabelRenderStrategy_ComputeLabelBounds_Methods; int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 3: return vtkPythonOverload::CallMethod(methods, self, args); } vtkPythonArgs::ArgCountError(nargs, "ComputeLabelBounds"); return nullptr; } static PyObject * PyvtkQtLabelRenderStrategy_RenderLabel_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RenderLabel"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkQtLabelRenderStrategy *op = static_cast(vp); const int size0 = 2; int temp0[2]; int save0[2]; vtkTextProperty *temp1 = nullptr; vtkStdString temp2; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetArray(temp0, size0) && ap.GetVTKObject(temp1, "vtkTextProperty") && ap.GetValue(temp2)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->RenderLabel(temp0, temp1, temp2); } else { op->vtkQtLabelRenderStrategy::RenderLabel(temp0, temp1, temp2); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkQtLabelRenderStrategy_RenderLabel_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RenderLabel"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkQtLabelRenderStrategy *op = static_cast(vp); const int size0 = 2; int temp0[2]; int save0[2]; vtkTextProperty *temp1 = nullptr; vtkStdString temp2; int temp3; PyObject *result = nullptr; if (op && ap.CheckArgCount(4) && ap.GetArray(temp0, size0) && ap.GetVTKObject(temp1, "vtkTextProperty") && ap.GetValue(temp2) && ap.GetValue(temp3)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->RenderLabel(temp0, temp1, temp2, temp3); } else { op->vtkQtLabelRenderStrategy::RenderLabel(temp0, temp1, temp2, temp3); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkQtLabelRenderStrategy_RenderLabel_s3(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RenderLabel"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkQtLabelRenderStrategy *op = static_cast(vp); const int size0 = 2; int temp0[2]; int save0[2]; vtkTextProperty *temp1 = nullptr; vtkUnicodeString temp2; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetArray(temp0, size0) && ap.GetVTKObject(temp1, "vtkTextProperty") && ap.GetValue(temp2)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->RenderLabel(temp0, temp1, temp2); } else { op->vtkQtLabelRenderStrategy::RenderLabel(temp0, temp1, temp2); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkQtLabelRenderStrategy_RenderLabel_s4(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RenderLabel"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkQtLabelRenderStrategy *op = static_cast(vp); const int size0 = 2; int temp0[2]; int save0[2]; vtkTextProperty *temp1 = nullptr; vtkUnicodeString temp2; int temp3; PyObject *result = nullptr; if (op && ap.CheckArgCount(4) && ap.GetArray(temp0, size0) && ap.GetVTKObject(temp1, "vtkTextProperty") && ap.GetValue(temp2) && ap.GetValue(temp3)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->RenderLabel(temp0, temp1, temp2, temp3); } else { op->vtkQtLabelRenderStrategy::RenderLabel(temp0, temp1, temp2, temp3); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkQtLabelRenderStrategy_RenderLabel_Methods[] = { {nullptr, PyvtkQtLabelRenderStrategy_RenderLabel_s1, METH_VARARGS, "@PVs *i *vtkTextProperty"}, {nullptr, PyvtkQtLabelRenderStrategy_RenderLabel_s2, METH_VARARGS, "@PVsi *i *vtkTextProperty"}, {nullptr, PyvtkQtLabelRenderStrategy_RenderLabel_s3, METH_VARARGS, "@PVu *i *vtkTextProperty"}, {nullptr, PyvtkQtLabelRenderStrategy_RenderLabel_s4, METH_VARARGS, "@PVui *i *vtkTextProperty"}, {nullptr, nullptr, 0, nullptr} }; static PyObject * PyvtkQtLabelRenderStrategy_RenderLabel(PyObject *self, PyObject *args) { PyMethodDef *methods = PyvtkQtLabelRenderStrategy_RenderLabel_Methods; int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 3: case 4: return vtkPythonOverload::CallMethod(methods, self, args); } vtkPythonArgs::ArgCountError(nargs, "RenderLabel"); return nullptr; } static PyObject * PyvtkQtLabelRenderStrategy_StartFrame(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "StartFrame"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkQtLabelRenderStrategy *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->StartFrame(); } else { op->vtkQtLabelRenderStrategy::StartFrame(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkQtLabelRenderStrategy_EndFrame(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "EndFrame"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkQtLabelRenderStrategy *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->EndFrame(); } else { op->vtkQtLabelRenderStrategy::EndFrame(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkQtLabelRenderStrategy_ReleaseGraphicsResources(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ReleaseGraphicsResources"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkQtLabelRenderStrategy *op = static_cast(vp); vtkWindow *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkWindow")) { if (ap.IsBound()) { op->ReleaseGraphicsResources(temp0); } else { op->vtkQtLabelRenderStrategy::ReleaseGraphicsResources(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkQtLabelRenderStrategy_Methods[] = { {"IsTypeOf", PyvtkQtLabelRenderStrategy_IsTypeOf, METH_VARARGS, "V.IsTypeOf(string) -> int\nC++: static vtkTypeBool IsTypeOf(const char *type)\n\nReturn 1 if this class type is the same type of (or a subclass\nof) the named class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"IsA", PyvtkQtLabelRenderStrategy_IsA, METH_VARARGS, "V.IsA(string) -> int\nC++: vtkTypeBool IsA(const char *type) override;\n\nReturn 1 if this class is the same type of (or a subclass of) the\nnamed class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"SafeDownCast", PyvtkQtLabelRenderStrategy_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkQtLabelRenderStrategy\nC++: static vtkQtLabelRenderStrategy *SafeDownCast(\n vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkQtLabelRenderStrategy_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkQtLabelRenderStrategy\nC++: vtkQtLabelRenderStrategy *NewInstance()\n\n"}, {"ComputeLabelBounds", PyvtkQtLabelRenderStrategy_ComputeLabelBounds, METH_VARARGS, "V.ComputeLabelBounds(vtkTextProperty, string, [float, float,\n float, float])\nC++: void ComputeLabelBounds(vtkTextProperty *tprop,\n vtkStdString label, double bds[4]) override;\nV.ComputeLabelBounds(vtkTextProperty, unicode, [float, float,\n float, float])\nC++: void ComputeLabelBounds(vtkTextProperty *tprop,\n vtkUnicodeString label, double bds[4]) override;\n\nCompute the bounds of a label. Must be performed after the\nrenderer is set.\n"}, {"RenderLabel", PyvtkQtLabelRenderStrategy_RenderLabel, METH_VARARGS, "V.RenderLabel([int, int], vtkTextProperty, string)\nC++: void RenderLabel(int x[2], vtkTextProperty *tprop,\n vtkStdString label) override;\nV.RenderLabel([int, int], vtkTextProperty, string, int)\nC++: void RenderLabel(int x[2], vtkTextProperty *tprop,\n vtkStdString label, int maxWidth) override;\nV.RenderLabel([int, int], vtkTextProperty, unicode)\nC++: void RenderLabel(int x[2], vtkTextProperty *tprop,\n vtkUnicodeString label) override;\nV.RenderLabel([int, int], vtkTextProperty, unicode, int)\nC++: void RenderLabel(int x[2], vtkTextProperty *tprop,\n vtkUnicodeString label, int maxWidth) override;\n\nRender a label at a location in world coordinates. Must be\nperformed between StartFrame() and EndFrame() calls.\n"}, {"StartFrame", PyvtkQtLabelRenderStrategy_StartFrame, METH_VARARGS, "V.StartFrame()\nC++: void StartFrame() override;\n\nStart a rendering frame. Renderer must be set.\n"}, {"EndFrame", PyvtkQtLabelRenderStrategy_EndFrame, METH_VARARGS, "V.EndFrame()\nC++: void EndFrame() override;\n\nEnd a rendering frame.\n"}, {"ReleaseGraphicsResources", PyvtkQtLabelRenderStrategy_ReleaseGraphicsResources, METH_VARARGS, "V.ReleaseGraphicsResources(vtkWindow)\nC++: void ReleaseGraphicsResources(vtkWindow *window) override;\n\nRelease any graphics resources that are being consumed by this\nstrategy. The parameter window could be used to determine which\ngraphic resources to release.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkQtLabelRenderStrategy_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkRenderingQtPython.vtkQtLabelRenderStrategy", // tp_name sizeof(PyVTKObject), // tp_basicsize 0, // tp_itemsize PyVTKObject_Delete, // tp_dealloc 0, // tp_print nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare PyVTKObject_Repr, // tp_repr nullptr, // tp_as_number nullptr, // tp_as_sequence nullptr, // tp_as_mapping nullptr, // tp_hash nullptr, // tp_call PyVTKObject_String, // tp_str PyObject_GenericGetAttr, // tp_getattro PyObject_GenericSetAttr, // tp_setattro &PyVTKObject_AsBuffer, // tp_as_buffer Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_BASETYPE, // tp_flags PyvtkQtLabelRenderStrategy_Doc, // tp_doc PyVTKObject_Traverse, // tp_traverse nullptr, // tp_clear nullptr, // tp_richcompare offsetof(PyVTKObject, vtk_weakreflist), // tp_weaklistoffset nullptr, // tp_iter nullptr, // tp_iternext nullptr, // tp_methods nullptr, // tp_members PyVTKObject_GetSet, // tp_getset nullptr, // tp_base nullptr, // tp_dict nullptr, // tp_descr_get nullptr, // tp_descr_set offsetof(PyVTKObject, vtk_dict), // tp_dictoffset nullptr, // tp_init nullptr, // tp_alloc PyVTKObject_New, // tp_new PyObject_GC_Del, // tp_free nullptr, // tp_is_gc nullptr, // tp_bases nullptr, // tp_mro nullptr, // tp_cache nullptr, // tp_subclasses nullptr, // tp_weaklist VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED }; static vtkObjectBase *PyvtkQtLabelRenderStrategy_StaticNew() { return vtkQtLabelRenderStrategy::New(); } PyObject *PyvtkQtLabelRenderStrategy_ClassNew() { PyVTKClass_Add( &PyvtkQtLabelRenderStrategy_Type, PyvtkQtLabelRenderStrategy_Methods, "vtkQtLabelRenderStrategy", &PyvtkQtLabelRenderStrategy_StaticNew); PyTypeObject *pytype = &PyvtkQtLabelRenderStrategy_Type; if ((pytype->tp_flags & Py_TPFLAGS_READY) != 0) { return (PyObject *)pytype; } #if !defined(VTK_PY3K) && PY_VERSION_HEX >= 0x02060000 pytype->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER; #endif pytype->tp_base = (PyTypeObject *)PyvtkLabelRenderStrategy_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkQtLabelRenderStrategy( PyObject *dict) { PyObject *o; o = PyvtkQtLabelRenderStrategy_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkQtLabelRenderStrategy", o) != 0) { Py_DECREF(o); } }