VTK  9.4.20250413
vtkColorTransferControlPointsItem.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
19#ifndef vtkColorTransferControlPointsItem_h
20#define vtkColorTransferControlPointsItem_h
21
22#include "vtkChartsCoreModule.h" // For export macro
24#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
25
26VTK_ABI_NAMESPACE_BEGIN
28
31{
32public:
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
40
45
47
50 vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction);
52
56 vtkIdType GetNumberOfPoints() const override;
57
63 void GetControlPoint(vtkIdType index, double* point) const override;
64
70 void SetControlPoint(vtkIdType index, double* point) override;
71
77 vtkIdType AddPoint(double* newPos) override;
78
79 using Superclass::RemovePoint;
80
86 vtkIdType RemovePoint(double* pos) override;
87
89
94 vtkSetMacro(ColorFill, bool);
95 vtkGetMacro(ColorFill, bool);
97
98protected:
101
102 void emitEvent(unsigned long event, void* params) override;
103
105
106 void DrawPoint(vtkContext2D* painter, vtkIdType index) override;
107 void EditPoint(float tX, float tY) override;
108
113 void ComputeBounds(double* bounds) override;
114
115 vtkColorTransferFunction* ColorTransferFunction = nullptr;
116 bool ColorFill = false;
117
118private:
120 void operator=(const vtkColorTransferControlPointsItem&) = delete;
121};
122
123VTK_ABI_NAMESPACE_END
124#endif
Control points for vtkColorTransferFunction.
void SetControlPoint(vtkIdType index, double *point) override
Sets the x and y coordinates as well as the midpoint and sharpness of the control point corresponding...
static vtkColorTransferControlPointsItem * New()
Creates a piecewise control points object.
void DrawPoint(vtkContext2D *painter, vtkIdType index) override
Internal function that paints a collection of points and optionally excludes some.
void GetControlPoint(vtkIdType index, double *point) const override
Returns the x and y coordinates as well as the midpoint and sharpness of the control point correspond...
vtkIdType GetNumberOfPoints() const override
Return the number of points in the color transfer function.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIdType AddPoint(double *newPos) override
Add a point to the function.
void ComputeBounds(double *bounds) override
Compute the bounds for this item.
void EditPoint(float tX, float tY) override
void SetColorTransferFunction(vtkColorTransferFunction *function)
Set the piecewise function to draw its points.
void emitEvent(unsigned long event, void *params) override
vtkIdType RemovePoint(double *pos) override
Remove a point of the function.
vtkMTimeType GetControlPointsMTime() override
Must be reimplemented by subclasses to calculate the points to draw.
Defines a transfer function for mapping a property to an RGB color value.
Class for drawing 2D primitives to a graphical context.
Abstract class for control points items.
a simple class to control print indentation
Definition vtkIndent.h:108
int vtkIdType
Definition vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_MARSHALAUTO