// python wrapper for vtkTextRepresentation // #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 "vtkTextRepresentation.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkTextRepresentation(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkTextRepresentation_ClassNew(); } #ifndef DECLARED_PyvtkBorderRepresentation_ClassNew extern "C" { PyObject *PyvtkBorderRepresentation_ClassNew(); } #define DECLARED_PyvtkBorderRepresentation_ClassNew #endif static const char *PyvtkTextRepresentation_Doc = "vtkTextRepresentation - represent text for vtkTextWidget\n\n" "Superclass: vtkBorderRepresentation\n\n" "This class represents text for a vtkTextWidget. This class provides\n" "support for interactively placing text on the 2D overlay plane. The\n" "text is defined by an instance of vtkTextActor.\n\n" "@sa\n" "vtkTextRepresentation vtkBorderWidget vtkAbstractWidget\n" "vtkWidgetRepresentation\n\n"; static PyObject * PyvtkTextRepresentation_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkTextRepresentation::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTextRepresentation_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *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->vtkTextRepresentation::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTextRepresentation_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkTextRepresentation *tempr = vtkTextRepresentation::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkTextRepresentation_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkTextRepresentation *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkTextRepresentation::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 * PyvtkTextRepresentation_SetTextActor(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetTextActor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); vtkTextActor *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkTextActor")) { if (ap.IsBound()) { op->SetTextActor(temp0); } else { op->vtkTextRepresentation::SetTextActor(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTextRepresentation_GetTextActor(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetTextActor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkTextActor *tempr = (ap.IsBound() ? op->GetTextActor() : op->vtkTextRepresentation::GetTextActor()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkTextRepresentation_SetText(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetText"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetText(temp0); } else { op->vtkTextRepresentation::SetText(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTextRepresentation_GetText(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetText"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { const char *tempr = (ap.IsBound() ? op->GetText() : op->vtkTextRepresentation::GetText()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTextRepresentation_BuildRepresentation(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "BuildRepresentation"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->BuildRepresentation(); } else { op->vtkTextRepresentation::BuildRepresentation(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTextRepresentation_GetSize(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetSize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); const int size0 = 2; double temp0[2]; double save0[2]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->GetSize(temp0); } else { op->vtkTextRepresentation::GetSize(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTextRepresentation_GetActors2D(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetActors2D"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); vtkPropCollection *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkPropCollection")) { if (ap.IsBound()) { op->GetActors2D(temp0); } else { op->vtkTextRepresentation::GetActors2D(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTextRepresentation_ReleaseGraphicsResources(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ReleaseGraphicsResources"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *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->vtkTextRepresentation::ReleaseGraphicsResources(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTextRepresentation_RenderOverlay(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RenderOverlay"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); vtkViewport *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkViewport")) { int tempr = (ap.IsBound() ? op->RenderOverlay(temp0) : op->vtkTextRepresentation::RenderOverlay(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTextRepresentation_RenderOpaqueGeometry(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RenderOpaqueGeometry"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); vtkViewport *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkViewport")) { int tempr = (ap.IsBound() ? op->RenderOpaqueGeometry(temp0) : op->vtkTextRepresentation::RenderOpaqueGeometry(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTextRepresentation_RenderTranslucentPolygonalGeometry(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RenderTranslucentPolygonalGeometry"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); vtkViewport *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkViewport")) { int tempr = (ap.IsBound() ? op->RenderTranslucentPolygonalGeometry(temp0) : op->vtkTextRepresentation::RenderTranslucentPolygonalGeometry(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTextRepresentation_HasTranslucentPolygonalGeometry(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "HasTranslucentPolygonalGeometry"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->HasTranslucentPolygonalGeometry() : op->vtkTextRepresentation::HasTranslucentPolygonalGeometry()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTextRepresentation_SetWindowLocation(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetWindowLocation"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetWindowLocation(temp0); } else { op->vtkTextRepresentation::SetWindowLocation(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTextRepresentation_GetWindowLocation(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetWindowLocation"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetWindowLocation() : op->vtkTextRepresentation::GetWindowLocation()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTextRepresentation_SetPosition_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); double temp0; double temp1; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetValue(temp1)) { if (ap.IsBound()) { op->SetPosition(temp0, temp1); } else { op->vtkTextRepresentation::SetPosition(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTextRepresentation_SetPosition_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); const int size0 = 2; double temp0[2]; double save0[2]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->SetPosition(temp0); } else { op->vtkTextRepresentation::SetPosition(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTextRepresentation_SetPosition(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 2: return PyvtkTextRepresentation_SetPosition_s1(self, args); case 1: return PyvtkTextRepresentation_SetPosition_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "SetPosition"); return nullptr; } static PyObject * PyvtkTextRepresentation_ExecuteTextPropertyModifiedEvent(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ExecuteTextPropertyModifiedEvent"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); vtkObject *temp0 = nullptr; unsigned long temp1; void *temp2 = nullptr; Py_buffer pbuf2 = VTK_PYBUFFER_INITIALIZER; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetVTKObject(temp0, "vtkObject") && ap.GetValue(temp1) && ap.GetBuffer(temp2, &pbuf2)) { if (ap.IsBound()) { op->ExecuteTextPropertyModifiedEvent(temp0, temp1, temp2); } else { op->vtkTextRepresentation::ExecuteTextPropertyModifiedEvent(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } #if PY_VERSION_HEX >= 0x02060000 if (pbuf2.obj != 0) { PyBuffer_Release(&pbuf2); } #endif return result; } static PyObject * PyvtkTextRepresentation_ExecuteTextActorModifiedEvent(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ExecuteTextActorModifiedEvent"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTextRepresentation *op = static_cast(vp); vtkObject *temp0 = nullptr; unsigned long temp1; void *temp2 = nullptr; Py_buffer pbuf2 = VTK_PYBUFFER_INITIALIZER; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetVTKObject(temp0, "vtkObject") && ap.GetValue(temp1) && ap.GetBuffer(temp2, &pbuf2)) { if (ap.IsBound()) { op->ExecuteTextActorModifiedEvent(temp0, temp1, temp2); } else { op->vtkTextRepresentation::ExecuteTextActorModifiedEvent(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } #if PY_VERSION_HEX >= 0x02060000 if (pbuf2.obj != 0) { PyBuffer_Release(&pbuf2); } #endif return result; } static PyMethodDef PyvtkTextRepresentation_Methods[] = { {"IsTypeOf", PyvtkTextRepresentation_IsTypeOf, METH_VARARGS, "V.IsTypeOf(string) -> int\nC++: static vtkTypeBool IsTypeOf(const char *type)\n\nStandard VTK methods.\n"}, {"IsA", PyvtkTextRepresentation_IsA, METH_VARARGS, "V.IsA(string) -> int\nC++: vtkTypeBool IsA(const char *type) override;\n\nStandard VTK methods.\n"}, {"SafeDownCast", PyvtkTextRepresentation_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkTextRepresentation\nC++: static vtkTextRepresentation *SafeDownCast(vtkObjectBase *o)\n\nStandard VTK methods.\n"}, {"NewInstance", PyvtkTextRepresentation_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkTextRepresentation\nC++: vtkTextRepresentation *NewInstance()\n\nStandard VTK methods.\n"}, {"SetTextActor", PyvtkTextRepresentation_SetTextActor, METH_VARARGS, "V.SetTextActor(vtkTextActor)\nC++: void SetTextActor(vtkTextActor *textActor)\n\nSpecify the vtkTextActor to manage. If not specified, then one is\nautomatically created.\n"}, {"GetTextActor", PyvtkTextRepresentation_GetTextActor, METH_VARARGS, "V.GetTextActor() -> vtkTextActor\nC++: virtual vtkTextActor *GetTextActor()\n\nSpecify the vtkTextActor to manage. If not specified, then one is\nautomatically created.\n"}, {"SetText", PyvtkTextRepresentation_SetText, METH_VARARGS, "V.SetText(string)\nC++: void SetText(const char *text)\n\nGet/Set the text string display by this representation.\n"}, {"GetText", PyvtkTextRepresentation_GetText, METH_VARARGS, "V.GetText() -> string\nC++: const char *GetText()\n\nGet/Set the text string display by this representation.\n"}, {"BuildRepresentation", PyvtkTextRepresentation_BuildRepresentation, METH_VARARGS, "V.BuildRepresentation()\nC++: void BuildRepresentation() override;\n\nSatisfy the superclasses API.\n"}, {"GetSize", PyvtkTextRepresentation_GetSize, METH_VARARGS, "V.GetSize([float, float])\nC++: void GetSize(double size[2]) override;\n\nSubclasses should implement these methods. See the superclasses'\ndocumentation for more information.\n"}, {"GetActors2D", PyvtkTextRepresentation_GetActors2D, METH_VARARGS, "V.GetActors2D(vtkPropCollection)\nC++: void GetActors2D(vtkPropCollection *) override;\n\nThese methods are necessary to make this representation behave as\na vtkProp.\n"}, {"ReleaseGraphicsResources", PyvtkTextRepresentation_ReleaseGraphicsResources, METH_VARARGS, "V.ReleaseGraphicsResources(vtkWindow)\nC++: void ReleaseGraphicsResources(vtkWindow *) override;\n\nThese methods are necessary to make this representation behave as\na vtkProp.\n"}, {"RenderOverlay", PyvtkTextRepresentation_RenderOverlay, METH_VARARGS, "V.RenderOverlay(vtkViewport) -> int\nC++: int RenderOverlay(vtkViewport *) override;\n\nThese methods are necessary to make this representation behave as\na vtkProp.\n"}, {"RenderOpaqueGeometry", PyvtkTextRepresentation_RenderOpaqueGeometry, METH_VARARGS, "V.RenderOpaqueGeometry(vtkViewport) -> int\nC++: int RenderOpaqueGeometry(vtkViewport *) override;\n\nThese methods are necessary to make this representation behave as\na vtkProp.\n"}, {"RenderTranslucentPolygonalGeometry", PyvtkTextRepresentation_RenderTranslucentPolygonalGeometry, METH_VARARGS, "V.RenderTranslucentPolygonalGeometry(vtkViewport) -> int\nC++: int RenderTranslucentPolygonalGeometry(vtkViewport *)\n override;\n\nThese methods are necessary to make this representation behave as\na vtkProp.\n"}, {"HasTranslucentPolygonalGeometry", PyvtkTextRepresentation_HasTranslucentPolygonalGeometry, METH_VARARGS, "V.HasTranslucentPolygonalGeometry() -> int\nC++: int HasTranslucentPolygonalGeometry() override;\n\nThese methods are necessary to make this representation behave as\na vtkProp.\n"}, {"SetWindowLocation", PyvtkTextRepresentation_SetWindowLocation, METH_VARARGS, "V.SetWindowLocation(int)\nC++: virtual void SetWindowLocation(int enumLocation)\n\nSet the text position, by enumeration ( AnyLocation = 0,\nLowerLeftCorner, LowerRightCorner, LowerCenter, UpperLeftCorner,\nUpperRightCorner, UpperCenter) related to the render window\n"}, {"GetWindowLocation", PyvtkTextRepresentation_GetWindowLocation, METH_VARARGS, "V.GetWindowLocation() -> int\nC++: virtual int GetWindowLocation()\n\nSet the text position, by enumeration ( AnyLocation = 0,\nLowerLeftCorner, LowerRightCorner, LowerCenter, UpperLeftCorner,\nUpperRightCorner, UpperCenter) related to the render window\n"}, {"SetPosition", PyvtkTextRepresentation_SetPosition, METH_VARARGS, "V.SetPosition(float, float)\nC++: void SetPosition(double x, double y) override;\nV.SetPosition([float, float])\nC++: void SetPosition(double pos[2]) override;\n\nSet the text position, by overiding the same function of\nvtkBorderRepresentation so that the Modified() will be called.\n"}, {"ExecuteTextPropertyModifiedEvent", PyvtkTextRepresentation_ExecuteTextPropertyModifiedEvent, METH_VARARGS, "V.ExecuteTextPropertyModifiedEvent(vtkObject, int, void)\nC++: void ExecuteTextPropertyModifiedEvent(vtkObject *obj,\n unsigned long enumEvent, void *p)\n\nInternal. Execute events observed by internal observer\n"}, {"ExecuteTextActorModifiedEvent", PyvtkTextRepresentation_ExecuteTextActorModifiedEvent, METH_VARARGS, "V.ExecuteTextActorModifiedEvent(vtkObject, int, void)\nC++: void ExecuteTextActorModifiedEvent(vtkObject *obj,\n unsigned long enumEvent, void *p)\n\nInternal. Execute events observed by internal observer\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkTextRepresentation_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkInteractionWidgetsPython.vtkTextRepresentation", // 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 PyvtkTextRepresentation_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 *PyvtkTextRepresentation_StaticNew() { return vtkTextRepresentation::New(); } PyObject *PyvtkTextRepresentation_ClassNew() { PyVTKClass_Add( &PyvtkTextRepresentation_Type, PyvtkTextRepresentation_Methods, "vtkTextRepresentation", &PyvtkTextRepresentation_StaticNew); PyTypeObject *pytype = &PyvtkTextRepresentation_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 *)PyvtkBorderRepresentation_ClassNew(); PyObject *d = pytype->tp_dict; PyObject *o; for (int c = 0; c < 7; c++) { static const struct { const char *name; int value; } constants[7] = { { "AnyLocation", vtkTextRepresentation::AnyLocation }, { "LowerLeftCorner", vtkTextRepresentation::LowerLeftCorner }, { "LowerRightCorner", vtkTextRepresentation::LowerRightCorner }, { "LowerCenter", vtkTextRepresentation::LowerCenter }, { "UpperLeftCorner", vtkTextRepresentation::UpperLeftCorner }, { "UpperRightCorner", vtkTextRepresentation::UpperRightCorner }, { "UpperCenter", vtkTextRepresentation::UpperCenter }, }; o = PyInt_FromLong(constants[c].value); if (o) { PyDict_SetItemString(d, constants[c].name, o); Py_DECREF(o); } } PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkTextRepresentation( PyObject *dict) { PyObject *o; o = PyvtkTextRepresentation_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkTextRepresentation", o) != 0) { Py_DECREF(o); } }