VTK  9.3.0
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
25VTK_ABI_NAMESPACE_BEGIN
27
29{
30public:
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
38
43
45
48 vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction);
50
54 vtkIdType GetNumberOfPoints() const override;
55
61 void GetControlPoint(vtkIdType index, double* point) const override;
62
68 void SetControlPoint(vtkIdType index, double* point) override;
69
75 vtkIdType AddPoint(double* newPos) override;
76
77 using Superclass::RemovePoint;
78
84 vtkIdType RemovePoint(double* pos) override;
85
87
92 vtkSetMacro(ColorFill, bool);
93 vtkGetMacro(ColorFill, bool);
95
96protected:
99
100 void emitEvent(unsigned long event, void* params) override;
101
103
104 void DrawPoint(vtkContext2D* painter, vtkIdType index) override;
105 void EditPoint(float tX, float tY) override;
106
111 void ComputeBounds(double* bounds) override;
112
113 vtkColorTransferFunction* ColorTransferFunction = nullptr;
114 bool ColorFill = false;
115
116private:
118 void operator=(const vtkColorTransferControlPointsItem&) = delete;
119};
120
121VTK_ABI_NAMESPACE_END
122#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:29
int vtkIdType
Definition vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270