// python wrapper for vtkPlotBar // #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 "vtkStdString.h" #include "vtkVector.h" #include "vtkVector.h" #include "vtkPlotBar.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkPlotBar(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkPlotBar_ClassNew(); } #ifndef DECLARED_PyvtkPlot_ClassNew extern "C" { PyObject *PyvtkPlot_ClassNew(); } #define DECLARED_PyvtkPlot_ClassNew #endif static const char *PyvtkPlotBar_Doc = "vtkPlotBar - Class for drawing an XY plot given two columns from a\nvtkTable.\n\n" "Superclass: vtkPlot\n\n" ; static PyObject * PyvtkPlotBar_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkPlotBar::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotBar_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *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->vtkPlotBar::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotBar_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkPlotBar *tempr = vtkPlotBar::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkPlotBar_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkPlotBar *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkPlotBar::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 * PyvtkPlotBar_Update(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Update"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->Update(); } else { op->vtkPlotBar::Update(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_Paint(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Paint"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *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->vtkPlotBar::Paint(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotBar_PaintLegend(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "PaintLegend"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *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->vtkPlotBar::PaintLegend(temp0, *temp1, temp2)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } Py_XDECREF(pobj1); return result; } static PyObject * PyvtkPlotBar_SetColor_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetColor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *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->vtkPlotBar::SetColor(temp0, temp1, temp2, temp3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_SetColor_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetColor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *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->SetColor(temp0, temp1, temp2); } else { op->vtkPlotBar::SetColor(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_SetColor(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 4: return PyvtkPlotBar_SetColor_s1(self, args); case 3: return PyvtkPlotBar_SetColor_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "SetColor"); return nullptr; } static PyObject * PyvtkPlotBar_GetColor(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetColor"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *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->GetColor(temp0); } else { op->vtkPlotBar::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 * PyvtkPlotBar_SetWidth(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetWidth"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *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->vtkPlotBar::SetWidth(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_GetWidth(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetWidth"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { float tempr = (ap.IsBound() ? op->GetWidth() : op->vtkPlotBar::GetWidth()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotBar_SetOffset(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOffset"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); float temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetOffset(temp0); } else { op->vtkPlotBar::SetOffset(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_GetOffset(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetOffset"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { float tempr = (ap.IsBound() ? op->GetOffset() : op->vtkPlotBar::GetOffset()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotBar_SetOrientation(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOrientation"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetOrientation(temp0); } else { op->vtkPlotBar::SetOrientation(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_GetOrientation(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetOrientation"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetOrientation() : op->vtkPlotBar::GetOrientation()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotBar_GetBounds_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetBounds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); const int size0 = 4; double temp0[4]; double save0[4]; bool temp1 = false; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetArray(temp0, size0) && ap.GetValue(temp1)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->GetBounds(temp0, temp1); } else { op->vtkPlotBar::GetBounds(temp0, temp1); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_GetBounds_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetBounds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *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->vtkPlotBar::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 * PyvtkPlotBar_GetBounds(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 2: return PyvtkPlotBar_GetBounds_s1(self, args); case 1: return PyvtkPlotBar_GetBounds_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "GetBounds"); return nullptr; } static PyObject * PyvtkPlotBar_GetUnscaledInputBounds(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetUnscaledInputBounds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *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->vtkPlotBar::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 * PyvtkPlotBar_SetInputArray(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetInputArray"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); int temp0; vtkStdString temp1; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetValue(temp1)) { if (ap.IsBound()) { op->SetInputArray(temp0, temp1); } else { op->vtkPlotBar::SetInputArray(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_SetColorSeries(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetColorSeries"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); vtkColorSeries *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkColorSeries")) { if (ap.IsBound()) { op->SetColorSeries(temp0); } else { op->vtkPlotBar::SetColorSeries(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_GetColorSeries(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetColorSeries"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkColorSeries *tempr = (ap.IsBound() ? op->GetColorSeries() : op->vtkPlotBar::GetColorSeries()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkPlotBar_SetLookupTable(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetLookupTable"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *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->vtkPlotBar::SetLookupTable(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_GetLookupTable(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetLookupTable"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkScalarsToColors *tempr = (ap.IsBound() ? op->GetLookupTable() : op->vtkPlotBar::GetLookupTable()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkPlotBar_CreateDefaultLookupTable(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "CreateDefaultLookupTable"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->CreateDefaultLookupTable(); } else { op->vtkPlotBar::CreateDefaultLookupTable(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_SetScalarVisibility(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetScalarVisibility"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); bool temp0 = false; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetScalarVisibility(temp0); } else { op->vtkPlotBar::SetScalarVisibility(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_GetScalarVisibility(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetScalarVisibility"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { bool tempr = (ap.IsBound() ? op->GetScalarVisibility() : op->vtkPlotBar::GetScalarVisibility()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotBar_ScalarVisibilityOn(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ScalarVisibilityOn"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->ScalarVisibilityOn(); } else { op->vtkPlotBar::ScalarVisibilityOn(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_ScalarVisibilityOff(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ScalarVisibilityOff"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->ScalarVisibilityOff(); } else { op->vtkPlotBar::ScalarVisibilityOff(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_SelectColorArray_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SelectColorArray"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); vtkIdType temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SelectColorArray(temp0); } else { op->vtkPlotBar::SelectColorArray(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_SelectColorArray_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SelectColorArray"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); vtkStdString temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SelectColorArray(temp0); } else { op->vtkPlotBar::SelectColorArray(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkPlotBar_SelectColorArray_Methods[] = { {nullptr, PyvtkPlotBar_SelectColorArray_s1, METH_VARARGS, "@k"}, {nullptr, PyvtkPlotBar_SelectColorArray_s2, METH_VARARGS, "@s"}, {nullptr, nullptr, 0, nullptr} }; static PyObject * PyvtkPlotBar_SelectColorArray(PyObject *self, PyObject *args) { PyMethodDef *methods = PyvtkPlotBar_SelectColorArray_Methods; int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 1: return vtkPythonOverload::CallMethod(methods, self, args); } vtkPythonArgs::ArgCountError(nargs, "SelectColorArray"); return nullptr; } static PyObject * PyvtkPlotBar_GetColorArrayName(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetColorArrayName"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkStdString tempr = (ap.IsBound() ? op->GetColorArrayName() : op->vtkPlotBar::GetColorArrayName()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotBar_GetLabels(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetLabels"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkStringArray *tempr = (ap.IsBound() ? op->GetLabels() : op->vtkPlotBar::GetLabels()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkPlotBar_SetGroupName(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetGroupName"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); vtkStdString temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetGroupName(temp0); } else { op->vtkPlotBar::SetGroupName(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkPlotBar_GetGroupName(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetGroupName"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkStdString tempr = (ap.IsBound() ? op->GetGroupName() : op->vtkPlotBar::GetGroupName()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotBar_GetTooltipLabel(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetTooltipLabel"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); vtkVector2d *temp0 = nullptr; PyObject *pobj0 = nullptr; vtkIdType temp1; vtkIdType temp2; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetSpecialObject(temp0, pobj0, "vtkVector2d") && ap.GetValue(temp1) && ap.GetValue(temp2)) { vtkStdString tempr = (ap.IsBound() ? op->GetTooltipLabel(*temp0, temp1, temp2) : op->vtkPlotBar::GetTooltipLabel(*temp0, temp1, temp2)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } Py_XDECREF(pobj0); return result; } static PyObject * PyvtkPlotBar_SelectPoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SelectPoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *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->vtkPlotBar::SelectPoints(*temp0, *temp1)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } Py_XDECREF(pobj0); Py_XDECREF(pobj1); return result; } static PyObject * PyvtkPlotBar_GetBarsCount(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetBarsCount"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetBarsCount() : op->vtkPlotBar::GetBarsCount()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkPlotBar_GetDataBounds(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetDataBounds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkPlotBar *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->GetDataBounds(temp0); } else { op->vtkPlotBar::GetDataBounds(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkPlotBar_Methods[] = { {"IsTypeOf", PyvtkPlotBar_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", PyvtkPlotBar_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", PyvtkPlotBar_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkPlotBar\nC++: static vtkPlotBar *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkPlotBar_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkPlotBar\nC++: vtkPlotBar *NewInstance()\n\n"}, {"Update", PyvtkPlotBar_Update, METH_VARARGS, "V.Update()\nC++: void Update() override;\n\nPerform any updates to the item that may be necessary before\nrendering.\n"}, {"Paint", PyvtkPlotBar_Paint, METH_VARARGS, "V.Paint(vtkContext2D) -> bool\nC++: bool Paint(vtkContext2D *painter) override;\n\nPaint event for the XY plot, called whenever the chart needs to\nbe drawn\n"}, {"PaintLegend", PyvtkPlotBar_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 XY plot, called whenever the legend\nneeds the plot items symbol/mark/line drawn. A rect is supplied\nwith the lower left corner of the rect (elements 0 and 1) and\nwith width x height (elements 2 and 3). The plot can choose how\nto fill the space supplied.\n"}, {"SetColor", PyvtkPlotBar_SetColor, METH_VARARGS, "V.SetColor(int, int, int, int)\nC++: void SetColor(unsigned char r, unsigned char g,\n unsigned char b, unsigned char a) override;\nV.SetColor(float, float, float)\nC++: void SetColor(double r, double g, double b) override;\n\nSet the plot color\n"}, {"GetColor", PyvtkPlotBar_GetColor, METH_VARARGS, "V.GetColor([float, float, float])\nC++: void GetColor(double rgb[3]) override;\n\nSet the plot color\n"}, {"SetWidth", PyvtkPlotBar_SetWidth, METH_VARARGS, "V.SetWidth(float)\nC++: void SetWidth(float _arg) override;\n\nSet the width of the line.\n"}, {"GetWidth", PyvtkPlotBar_GetWidth, METH_VARARGS, "V.GetWidth() -> float\nC++: float GetWidth() override;\n\nGet the width of the line.\n"}, {"SetOffset", PyvtkPlotBar_SetOffset, METH_VARARGS, "V.SetOffset(float)\nC++: virtual void SetOffset(float _arg)\n\nSet/get the horizontal offset of the bars. Positive values move\nthe bars leftward. For HORIZONTAL orientation, offsets bars\nvertically, with a positive value moving bars downward.\n"}, {"GetOffset", PyvtkPlotBar_GetOffset, METH_VARARGS, "V.GetOffset() -> float\nC++: virtual float GetOffset()\n\nSet/get the horizontal offset of the bars. Positive values move\nthe bars leftward. For HORIZONTAL orientation, offsets bars\nvertically, with a positive value moving bars downward.\n"}, {"SetOrientation", PyvtkPlotBar_SetOrientation, METH_VARARGS, "V.SetOrientation(int)\nC++: virtual void SetOrientation(int orientation)\n\nSet/get the orientation of the bars. Valid orientations are\nVERTICAL (default) and HORIZONTAL.\n"}, {"GetOrientation", PyvtkPlotBar_GetOrientation, METH_VARARGS, "V.GetOrientation() -> int\nC++: virtual int GetOrientation()\n\nSet/get the orientation of the bars. Valid orientations are\nVERTICAL (default) and HORIZONTAL.\n"}, {"GetBounds", PyvtkPlotBar_GetBounds, METH_VARARGS, "V.GetBounds([float, float, float, float], bool)\nC++: virtual void GetBounds(double bounds[4], bool unscaled)\nV.GetBounds([float, float, float, float])\nC++: void GetBounds(double bounds[4]) override;\n\nA helper used by both GetUnscaledBounds and GetBounds(double[4]).\n"}, {"GetUnscaledInputBounds", PyvtkPlotBar_GetUnscaledInputBounds, METH_VARARGS, "V.GetUnscaledInputBounds([float, float, float, float])\nC++: void GetUnscaledInputBounds(double bounds[4]) override;\n\nGet un-log-scaled bounds for this mapper as\n(Xmin,Xmax,Ymin,Ymax).\n"}, {"SetInputArray", PyvtkPlotBar_SetInputArray, METH_VARARGS, "V.SetInputArray(int, string)\nC++: void SetInputArray(int index, const vtkStdString &name)\n override;\n\nWhen used to set additional arrays, stacked bars are created.\n"}, {"SetColorSeries", PyvtkPlotBar_SetColorSeries, METH_VARARGS, "V.SetColorSeries(vtkColorSeries)\nC++: void SetColorSeries(vtkColorSeries *colorSeries)\n\nSet the color series to use if this becomes a stacked bar plot.\n"}, {"GetColorSeries", PyvtkPlotBar_GetColorSeries, METH_VARARGS, "V.GetColorSeries() -> vtkColorSeries\nC++: vtkColorSeries *GetColorSeries()\n\nGet the color series used if when this is a stacked bar plot.\n"}, {"SetLookupTable", PyvtkPlotBar_SetLookupTable, METH_VARARGS, "V.SetLookupTable(vtkScalarsToColors)\nC++: virtual void SetLookupTable(vtkScalarsToColors *lut)\n\nSpecify a lookup table for the mapper to use.\n"}, {"GetLookupTable", PyvtkPlotBar_GetLookupTable, METH_VARARGS, "V.GetLookupTable() -> vtkScalarsToColors\nC++: virtual vtkScalarsToColors *GetLookupTable()\n\nSpecify a lookup table for the mapper to use.\n"}, {"CreateDefaultLookupTable", PyvtkPlotBar_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"}, {"SetScalarVisibility", PyvtkPlotBar_SetScalarVisibility, METH_VARARGS, "V.SetScalarVisibility(bool)\nC++: virtual void SetScalarVisibility(bool _arg)\n\nTurn on/off flag to control whether scalar data is used to color\nobjects.\n"}, {"GetScalarVisibility", PyvtkPlotBar_GetScalarVisibility, METH_VARARGS, "V.GetScalarVisibility() -> bool\nC++: virtual bool GetScalarVisibility()\n\nTurn on/off flag to control whether scalar data is used to color\nobjects.\n"}, {"ScalarVisibilityOn", PyvtkPlotBar_ScalarVisibilityOn, METH_VARARGS, "V.ScalarVisibilityOn()\nC++: virtual void ScalarVisibilityOn()\n\nTurn on/off flag to control whether scalar data is used to color\nobjects.\n"}, {"ScalarVisibilityOff", PyvtkPlotBar_ScalarVisibilityOff, METH_VARARGS, "V.ScalarVisibilityOff()\nC++: virtual void ScalarVisibilityOff()\n\nTurn on/off flag to control whether scalar data is used to color\nobjects.\n"}, {"SelectColorArray", PyvtkPlotBar_SelectColorArray, METH_VARARGS, "V.SelectColorArray(int)\nC++: void SelectColorArray(vtkIdType arrayNum)\nV.SelectColorArray(string)\nC++: void SelectColorArray(const vtkStdString &arrayName)\n\nWhen ScalarMode is set to UsePointFieldData or UseCellFieldData,\nyou can specify which array to use for coloring using these\nmethods. The lookup table will decide how to convert vectors to\ncolors.\n"}, {"GetColorArrayName", PyvtkPlotBar_GetColorArrayName, METH_VARARGS, "V.GetColorArrayName() -> string\nC++: vtkStdString GetColorArrayName()\n\nGet the array name to color by.\n"}, {"GetLabels", PyvtkPlotBar_GetLabels, METH_VARARGS, "V.GetLabels() -> vtkStringArray\nC++: vtkStringArray *GetLabels() override;\n\nGet the plot labels.\n"}, {"SetGroupName", PyvtkPlotBar_SetGroupName, METH_VARARGS, "V.SetGroupName(string)\nC++: virtual void SetGroupName(const vtkStdString &name)\n\nSet the group name of the bar chart - can be displayed on the X\naxis.\n"}, {"GetGroupName", PyvtkPlotBar_GetGroupName, METH_VARARGS, "V.GetGroupName() -> string\nC++: virtual vtkStdString GetGroupName()\n\nGet the group name of the bar char - can be displayed on the X\naxis.\n"}, {"GetTooltipLabel", PyvtkPlotBar_GetTooltipLabel, METH_VARARGS, "V.GetTooltipLabel(vtkVector2d, int, int) -> string\nC++: vtkStdString GetTooltipLabel(const vtkVector2d &plotPos,\n vtkIdType seriesIndex, vtkIdType segmentIndex) override;\n\nGenerate and return the tooltip label string for this plot The\nsegmentIndex is implemented here.\n"}, {"SelectPoints", PyvtkPlotBar_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"}, {"GetBarsCount", PyvtkPlotBar_GetBarsCount, METH_VARARGS, "V.GetBarsCount() -> int\nC++: int GetBarsCount()\n\nGet amount of plotted bars.\n"}, {"GetDataBounds", PyvtkPlotBar_GetDataBounds, METH_VARARGS, "V.GetDataBounds([float, float])\nC++: void GetDataBounds(double bounds[2])\n\nGet the data bounds for this mapper as (Xmin,Xmax).\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkPlotBar_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkChartsCorePython.vtkPlotBar", // 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 PyvtkPlotBar_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 *PyvtkPlotBar_StaticNew() { return vtkPlotBar::New(); } PyObject *PyvtkPlotBar_ClassNew() { PyVTKClass_Add( &PyvtkPlotBar_Type, PyvtkPlotBar_Methods, "vtkPlotBar", &PyvtkPlotBar_StaticNew); PyTypeObject *pytype = &PyvtkPlotBar_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(); PyObject *d = pytype->tp_dict; PyObject *o; for (int c = 0; c < 2; c++) { static const struct { const char *name; int value; } constants[2] = { { "VERTICAL", vtkPlotBar::VERTICAL }, { "HORIZONTAL", vtkPlotBar::HORIZONTAL }, }; 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_vtkPlotBar( PyObject *dict) { PyObject *o; o = PyvtkPlotBar_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkPlotBar", o) != 0) { Py_DECREF(o); } }