// python wrapper for vtkPen // #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 "vtkColor.h" #include "vtkPen.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkPen(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkPen_ClassNew(); } #ifndef DECLARED_PyvtkObject_ClassNew extern "C" { PyObject *PyvtkObject_ClassNew(); } #define DECLARED_PyvtkObject_ClassNew #endif static const char *PyvtkPen_Doc = "vtkPen - provides a pen that draws the outlines of shapes drawn by\nvtkContext2D.\n\n" "Superclass: vtkObject\n\n" "The vtkPen defines the outline of shapes that are drawn by\n" "vtkContext2D. The color is stored as four unsigned chars (RGBA),\n" "where the opacity defaults to 255, but can be modified separately to\n" "the other components. Ideally we would use a lightweight color class\n" "to store and pass around colors.\n\n"; static PyObject * PyvtkPen_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkPen::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPen_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *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->vtkPen::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPen_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkPen *tempr = vtkPen::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkPen_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkPen *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkPen::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 * PyvtkPen_SetLineType(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetLineType"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetLineType(temp0); } else { op->vtkPen::SetLineType(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPen_GetLineType(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetLineType"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetLineType() : op->vtkPen::GetLineType()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPen_SetColorF_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetColorF"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->SetColorF(temp0); } else { op->vtkPen::SetColorF(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPen_SetColorF_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetColorF"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); double temp0; double temp1; double temp2; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.GetValue(temp2)) { if (ap.IsBound()) { op->SetColorF(temp0, temp1, temp2); } else { op->vtkPen::SetColorF(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPen_SetColorF_s3(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetColorF"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); double temp0; double temp1; double temp2; double temp3; PyObject *result = nullptr; if (op && ap.CheckArgCount(4) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.GetValue(temp2) && ap.GetValue(temp3)) { if (ap.IsBound()) { op->SetColorF(temp0, temp1, temp2, temp3); } else { op->vtkPen::SetColorF(temp0, temp1, temp2, temp3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPen_SetColorF(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 1: return PyvtkPen_SetColorF_s1(self, args); case 3: return PyvtkPen_SetColorF_s2(self, args); case 4: return PyvtkPen_SetColorF_s3(self, args); } vtkPythonArgs::ArgCountError(nargs, "SetColorF"); return nullptr; } static PyObject * PyvtkPen_SetOpacityF(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOpacityF"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); double temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetOpacityF(temp0); } else { op->vtkPen::SetOpacityF(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPen_SetColor_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetColor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); const int size0 = 3; unsigned char temp0[3]; unsigned char save0[3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->SetColor(temp0); } else { op->vtkPen::SetColor(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPen_SetColor_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetColor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); unsigned char temp0; unsigned char temp1; unsigned char temp2; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.GetValue(temp2)) { if (ap.IsBound()) { op->SetColor(temp0, temp1, temp2); } else { op->vtkPen::SetColor(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPen_SetColor_s3(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetColor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); unsigned char temp0; unsigned char temp1; unsigned char temp2; unsigned char temp3; PyObject *result = nullptr; if (op && ap.CheckArgCount(4) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.GetValue(temp2) && ap.GetValue(temp3)) { if (ap.IsBound()) { op->SetColor(temp0, temp1, temp2, temp3); } else { op->vtkPen::SetColor(temp0, temp1, temp2, temp3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPen_SetColor_s4(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetColor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); vtkColor4ub *temp0 = nullptr; PyObject *pobj0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetSpecialObject(temp0, pobj0, "vtkColor4ub")) { if (ap.IsBound()) { op->SetColor(*temp0); } else { op->vtkPen::SetColor(*temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } Py_XDECREF(pobj0); return result; } static PyMethodDef PyvtkPen_SetColor_Methods[] = { {nullptr, PyvtkPen_SetColor_s1, METH_VARARGS, "@P *B"}, {nullptr, PyvtkPen_SetColor_s4, METH_VARARGS, "@W vtkColor4ub"}, {nullptr, nullptr, 0, nullptr} }; static PyObject * PyvtkPen_SetColor(PyObject *self, PyObject *args) { PyMethodDef *methods = PyvtkPen_SetColor_Methods; int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 3: return PyvtkPen_SetColor_s2(self, args); case 4: return PyvtkPen_SetColor_s3(self, args); case 1: return vtkPythonOverload::CallMethod(methods, self, args); } vtkPythonArgs::ArgCountError(nargs, "SetColor"); return nullptr; } static PyObject * PyvtkPen_SetOpacity(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOpacity"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); unsigned char temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetOpacity(temp0); } else { op->vtkPen::SetOpacity(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPen_GetColorF(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetColorF"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->GetColorF(temp0); } else { op->vtkPen::GetColorF(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPen_GetColor_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetColor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); const int size0 = 3; unsigned char temp0[3]; unsigned char save0[3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->GetColor(temp0); } else { op->vtkPen::GetColor(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPen_GetColor_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetColor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { unsigned char *tempr = (ap.IsBound() ? op->GetColor() : op->vtkPen::GetColor()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPen_GetColor(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 1: return PyvtkPen_GetColor_s1(self, args); case 0: return PyvtkPen_GetColor_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "GetColor"); return nullptr; } static PyObject * PyvtkPen_GetColorObject(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetColorObject"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkColor4ub tempr = (ap.IsBound() ? op->GetColorObject() : op->vtkPen::GetColorObject()); if (!ap.ErrorOccurred()) { result = ap.BuildSpecialObject(&tempr, "vtkColor4ub"); } } return result; } static PyObject * PyvtkPen_GetOpacity(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetOpacity"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { unsigned char tempr = (ap.IsBound() ? op->GetOpacity() : op->vtkPen::GetOpacity()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPen_SetWidth(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetWidth"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); float temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetWidth(temp0); } else { op->vtkPen::SetWidth(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPen_GetWidth(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetWidth"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { float tempr = (ap.IsBound() ? op->GetWidth() : op->vtkPen::GetWidth()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPen_DeepCopy(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "DeepCopy"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPen *op = static_cast(vp); vtkPen *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkPen")) { if (ap.IsBound()) { op->DeepCopy(temp0); } else { op->vtkPen::DeepCopy(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkPen_Methods[] = { {"IsTypeOf", PyvtkPen_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", PyvtkPen_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", PyvtkPen_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkPen\nC++: static vtkPen *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkPen_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkPen\nC++: vtkPen *NewInstance()\n\n"}, {"SetLineType", PyvtkPen_SetLineType, METH_VARARGS, "V.SetLineType(int)\nC++: void SetLineType(int type)\n\nSet the type of line that the pen should draw. The default is\nsolid (1).\n"}, {"GetLineType", PyvtkPen_GetLineType, METH_VARARGS, "V.GetLineType() -> int\nC++: int GetLineType()\n\nGet the type of line that the pen will draw.\n"}, {"SetColorF", PyvtkPen_SetColorF, METH_VARARGS, "V.SetColorF([float, float, float])\nC++: void SetColorF(double color[3])\nV.SetColorF(float, float, float)\nC++: void SetColorF(double r, double g, double b)\nV.SetColorF(float, float, float, float)\nC++: void SetColorF(double r, double g, double b, double a)\n\nSet the color of the brush with three component doubles (RGB),\nranging from 0.0 to 1.0.\n"}, {"SetOpacityF", PyvtkPen_SetOpacityF, METH_VARARGS, "V.SetOpacityF(float)\nC++: void SetOpacityF(double a)\n\nSet the opacity with a double, ranging from 0.0 (transparent) to\n1.0 (opaque).\n"}, {"SetColor", PyvtkPen_SetColor, METH_VARARGS, "V.SetColor([int, int, int])\nC++: void SetColor(unsigned char color[3])\nV.SetColor(int, int, int)\nC++: void SetColor(unsigned char r, unsigned char g,\n unsigned char b)\nV.SetColor(int, int, int, int)\nC++: void SetColor(unsigned char r, unsigned char g,\n unsigned char b, unsigned char a)\nV.SetColor(vtkColor4ub)\nC++: void SetColor(const vtkColor4ub &color)\n\nSet the color of the brush with three component unsigned chars\n(RGB), ranging from 0 to 255.\n"}, {"SetOpacity", PyvtkPen_SetOpacity, METH_VARARGS, "V.SetOpacity(int)\nC++: void SetOpacity(unsigned char a)\n\nSet the opacity with an unsigned char, ranging from 0\n(transparent) to 255 (opaque).\n"}, {"GetColorF", PyvtkPen_GetColorF, METH_VARARGS, "V.GetColorF([float, float, float])\nC++: void GetColorF(double color[3])\n\nGet the color of the brush - expects a double of length 3 to copy\ninto.\n"}, {"GetColor", PyvtkPen_GetColor, METH_VARARGS, "V.GetColor([int, int, int])\nC++: void GetColor(unsigned char color[3])\nV.GetColor() -> (int, ...)\nC++: unsigned char *GetColor()\n\nGet the color of the brush - expects an unsigned char of length\n3.\n"}, {"GetColorObject", PyvtkPen_GetColorObject, METH_VARARGS, "V.GetColorObject() -> vtkColor4ub\nC++: vtkColor4ub GetColorObject()\n\nGet the color of the pen.\n"}, {"GetOpacity", PyvtkPen_GetOpacity, METH_VARARGS, "V.GetOpacity() -> int\nC++: unsigned char GetOpacity()\n\nGet the opacity (unsigned char), ranging from 0 (transparent) to\n255 (opaque).\n"}, {"SetWidth", PyvtkPen_SetWidth, METH_VARARGS, "V.SetWidth(float)\nC++: virtual void SetWidth(float _arg)\n\nSet/Get the width of the pen.\n"}, {"GetWidth", PyvtkPen_GetWidth, METH_VARARGS, "V.GetWidth() -> float\nC++: virtual float GetWidth()\n\nSet/Get the width of the pen.\n"}, {"DeepCopy", PyvtkPen_DeepCopy, METH_VARARGS, "V.DeepCopy(vtkPen)\nC++: void DeepCopy(vtkPen *pen)\n\nMake a deep copy of the supplied pen.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkPen_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkRenderingContext2DPython.vtkPen", // 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 PyvtkPen_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 *PyvtkPen_StaticNew() { return vtkPen::New(); } PyObject *PyvtkPen_ClassNew() { PyVTKClass_Add( &PyvtkPen_Type, PyvtkPen_Methods, "vtkPen", &PyvtkPen_StaticNew); PyTypeObject *pytype = &PyvtkPen_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 *)PyvtkObject_ClassNew(); PyObject *d = pytype->tp_dict; PyObject *o; for (int c = 0; c < 6; c++) { static const struct { const char *name; int value; } constants[6] = { { "NO_PEN", vtkPen::NO_PEN }, { "SOLID_LINE", vtkPen::SOLID_LINE }, { "DASH_LINE", vtkPen::DASH_LINE }, { "DOT_LINE", vtkPen::DOT_LINE }, { "DASH_DOT_LINE", vtkPen::DASH_DOT_LINE }, { "DASH_DOT_DOT_LINE", vtkPen::DASH_DOT_DOT_LINE }, }; 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_vtkPen( PyObject *dict) { PyObject *o; o = PyvtkPen_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkPen", o) != 0) { Py_DECREF(o); } }