// python wrapper for vtkPlotFunctionalBag // #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 "vtkRect.h" #include "vtkVector.h" #include "vtkContextPolygon.h" #include "vtkPlotFunctionalBag.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkPlotFunctionalBag(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkPlotFunctionalBag_ClassNew(); } #ifndef DECLARED_PyvtkPlot_ClassNew extern "C" { PyObject *PyvtkPlot_ClassNew(); } #define DECLARED_PyvtkPlot_ClassNew #endif static const char *PyvtkPlotFunctionalBag_Doc = "vtkPlotFunctionalBag - Class for drawing an XY line plot or bag given\ntwo columns from a vtkTable.\n\n" "Superclass: vtkPlot\n\n" "Depending on the number of components, this class will draw either a\n" "line plot (for 1 component column) or, for two components columns, a\n" "filled polygonal band (the bag) going from the first to the second\n" "component on the Y-axis along the X-axis. The filter\n" "vtkExtractFunctionalBagPlot is intended to create such \"bag\" columns.\n\n" "@sa\n" "vtkExtractFunctionalBagPlot\n\n"; static PyObject * PyvtkPlotFunctionalBag_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkPlotFunctionalBag::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotFunctionalBag_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *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->vtkPlotFunctionalBag::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotFunctionalBag_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkPlotFunctionalBag *tempr = vtkPlotFunctionalBag::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkPlotFunctionalBag_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkPlotFunctionalBag *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkPlotFunctionalBag::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 * PyvtkPlotFunctionalBag_IsBag(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsBag"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { bool tempr = (ap.IsBound() ? op->IsBag() : op->vtkPlotFunctionalBag::IsBag()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotFunctionalBag_GetVisible(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetVisible"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { bool tempr = (ap.IsBound() ? op->GetVisible() : op->vtkPlotFunctionalBag::GetVisible()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotFunctionalBag_Update(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Update"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->Update(); } else { op->vtkPlotFunctionalBag::Update(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotFunctionalBag_Paint(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Paint"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *op = static_cast(vp); vtkContext2D *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkContext2D")) { bool tempr = (ap.IsBound() ? op->Paint(temp0) : op->vtkPlotFunctionalBag::Paint(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotFunctionalBag_PaintLegend(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "PaintLegend"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *op = static_cast(vp); vtkContext2D *temp0 = nullptr; vtkRectf *temp1 = nullptr; PyObject *pobj1 = nullptr; int temp2; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetVTKObject(temp0, "vtkContext2D") && ap.GetSpecialObject(temp1, pobj1, "vtkRectf") && ap.GetValue(temp2)) { bool tempr = (ap.IsBound() ? op->PaintLegend(temp0, *temp1, temp2) : op->vtkPlotFunctionalBag::PaintLegend(temp0, *temp1, temp2)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } Py_XDECREF(pobj1); return result; } static PyObject * PyvtkPlotFunctionalBag_GetBounds(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetBounds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *op = static_cast(vp); const int size0 = 4; double temp0[4]; double save0[4]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->GetBounds(temp0); } else { op->vtkPlotFunctionalBag::GetBounds(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotFunctionalBag_GetUnscaledInputBounds(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetUnscaledInputBounds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *op = static_cast(vp); const int size0 = 4; double temp0[4]; double save0[4]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->GetUnscaledInputBounds(temp0); } else { op->vtkPlotFunctionalBag::GetUnscaledInputBounds(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotFunctionalBag_SetLookupTable(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetLookupTable"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *op = static_cast(vp); vtkScalarsToColors *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkScalarsToColors")) { if (ap.IsBound()) { op->SetLookupTable(temp0); } else { op->vtkPlotFunctionalBag::SetLookupTable(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotFunctionalBag_GetLookupTable(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetLookupTable"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkScalarsToColors *tempr = (ap.IsBound() ? op->GetLookupTable() : op->vtkPlotFunctionalBag::GetLookupTable()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkPlotFunctionalBag_CreateDefaultLookupTable(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "CreateDefaultLookupTable"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->CreateDefaultLookupTable(); } else { op->vtkPlotFunctionalBag::CreateDefaultLookupTable(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotFunctionalBag_SelectPoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SelectPoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *op = static_cast(vp); vtkVector2f *temp0 = nullptr; PyObject *pobj0 = nullptr; vtkVector2f *temp1 = nullptr; PyObject *pobj1 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetSpecialObject(temp0, pobj0, "vtkVector2f") && ap.GetSpecialObject(temp1, pobj1, "vtkVector2f")) { bool tempr = (ap.IsBound() ? op->SelectPoints(*temp0, *temp1) : op->vtkPlotFunctionalBag::SelectPoints(*temp0, *temp1)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } Py_XDECREF(pobj0); Py_XDECREF(pobj1); return result; } static PyObject * PyvtkPlotFunctionalBag_SelectPointsInPolygon(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SelectPointsInPolygon"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotFunctionalBag *op = static_cast(vp); vtkContextPolygon *temp0 = nullptr; PyObject *pobj0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetSpecialObject(temp0, pobj0, "vtkContextPolygon")) { bool tempr = (ap.IsBound() ? op->SelectPointsInPolygon(*temp0) : op->vtkPlotFunctionalBag::SelectPointsInPolygon(*temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } Py_XDECREF(pobj0); return result; } static PyMethodDef PyvtkPlotFunctionalBag_Methods[] = { {"IsTypeOf", PyvtkPlotFunctionalBag_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", PyvtkPlotFunctionalBag_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", PyvtkPlotFunctionalBag_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkPlotFunctionalBag\nC++: static vtkPlotFunctionalBag *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkPlotFunctionalBag_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkPlotFunctionalBag\nC++: vtkPlotFunctionalBag *NewInstance()\n\n"}, {"IsBag", PyvtkPlotFunctionalBag_IsBag, METH_VARARGS, "V.IsBag() -> bool\nC++: virtual bool IsBag()\n\nReturns true if the plot is a functional bag, false if it is a\nsimple line.\n"}, {"GetVisible", PyvtkPlotFunctionalBag_GetVisible, METH_VARARGS, "V.GetVisible() -> bool\nC++: bool GetVisible() override;\n\nReimplemented to enforce visibility when selected.\n"}, {"Update", PyvtkPlotFunctionalBag_Update, METH_VARARGS, "V.Update()\nC++: void Update() override;\n\nPerform any updates to the item that may be necessary before\nrendering. The scene should take care of calling this on all\nitems before their Paint function is invoked.\n"}, {"Paint", PyvtkPlotFunctionalBag_Paint, METH_VARARGS, "V.Paint(vtkContext2D) -> bool\nC++: bool Paint(vtkContext2D *painter) override;\n\nPaint event for the plot, called whenever the chart needs to be\ndrawn.\n"}, {"PaintLegend", PyvtkPlotFunctionalBag_PaintLegend, METH_VARARGS, "V.PaintLegend(vtkContext2D, vtkRectf, int) -> bool\nC++: bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect,\n int legendIndex) override;\n\nPaint legend event for the plot, called whenever the legend needs\nthe plot items symbol/mark/line drawn. A rect is supplied with\nthe lower left corner of the rect (elements 0 and 1) and with\nwidth x height (elements 2 and 3). The plot can choose how to\nfill the space supplied.\n"}, {"GetBounds", PyvtkPlotFunctionalBag_GetBounds, METH_VARARGS, "V.GetBounds([float, float, float, float])\nC++: void GetBounds(double bounds[4]) override;\n\nGet the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).\n"}, {"GetUnscaledInputBounds", PyvtkPlotFunctionalBag_GetUnscaledInputBounds, METH_VARARGS, "V.GetUnscaledInputBounds([float, float, float, float])\nC++: void GetUnscaledInputBounds(double bounds[4]) override;\n\nGet the non-log-scaled bounds on chart inputs for this plot as\n(Xmin, Xmax, Ymin, Ymax).\n"}, {"SetLookupTable", PyvtkPlotFunctionalBag_SetLookupTable, METH_VARARGS, "V.SetLookupTable(vtkScalarsToColors)\nC++: void SetLookupTable(vtkScalarsToColors *lut)\n\nSpecify a lookup table for the mapper to use.\n"}, {"GetLookupTable", PyvtkPlotFunctionalBag_GetLookupTable, METH_VARARGS, "V.GetLookupTable() -> vtkScalarsToColors\nC++: vtkScalarsToColors *GetLookupTable()\n\nSpecify a lookup table for the mapper to use.\n"}, {"CreateDefaultLookupTable", PyvtkPlotFunctionalBag_CreateDefaultLookupTable, METH_VARARGS, "V.CreateDefaultLookupTable()\nC++: virtual void CreateDefaultLookupTable()\n\nCreate default lookup table. Generally used to create one when\nnone is available with the scalar data.\n"}, {"SelectPoints", PyvtkPlotFunctionalBag_SelectPoints, METH_VARARGS, "V.SelectPoints(vtkVector2f, vtkVector2f) -> bool\nC++: bool SelectPoints(const vtkVector2f &min,\n const vtkVector2f &max) override;\n\nSelect all points in the specified rectangle.\n"}, {"SelectPointsInPolygon", PyvtkPlotFunctionalBag_SelectPointsInPolygon, METH_VARARGS, "V.SelectPointsInPolygon(vtkContextPolygon) -> bool\nC++: bool SelectPointsInPolygon(const vtkContextPolygon &polygon)\n override;\n\nSelect all points in the specified polygon.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkPlotFunctionalBag_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkChartsCorePython.vtkPlotFunctionalBag", // 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 PyvtkPlotFunctionalBag_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 *PyvtkPlotFunctionalBag_StaticNew() { return vtkPlotFunctionalBag::New(); } PyObject *PyvtkPlotFunctionalBag_ClassNew() { PyVTKClass_Add( &PyvtkPlotFunctionalBag_Type, PyvtkPlotFunctionalBag_Methods, "vtkPlotFunctionalBag", &PyvtkPlotFunctionalBag_StaticNew); PyTypeObject *pytype = &PyvtkPlotFunctionalBag_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 *)PyvtkPlot_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkPlotFunctionalBag( PyObject *dict) { PyObject *o; o = PyvtkPlotFunctionalBag_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkPlotFunctionalBag", o) != 0) { Py_DECREF(o); } }