VTK  9.2.6
vtkColorTransferControlPointsItem.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkColorTransferControlPointsItem.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15
30
31#ifndef vtkColorTransferControlPointsItem_h
32#define vtkColorTransferControlPointsItem_h
33
34#include "vtkChartsCoreModule.h" // For export macro
36
38
40{
41public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
49
54
56
61
65 vtkIdType GetNumberOfPoints() const override;
66
72 void GetControlPoint(vtkIdType index, double* point) const override;
73
79 void SetControlPoint(vtkIdType index, double* point) override;
80
86 vtkIdType AddPoint(double* newPos) override;
87
89
95 vtkIdType RemovePoint(double* pos) override;
96
98
103 vtkSetMacro(ColorFill, bool);
104 vtkGetMacro(ColorFill, bool);
106
107protected:
110
111 void emitEvent(unsigned long event, void* params) override;
112
114
115 void DrawPoint(vtkContext2D* painter, vtkIdType index) override;
116 void EditPoint(float tX, float tY) override;
117
122 void ComputeBounds(double* bounds) override;
123
125 bool ColorFill = false;
126
127private:
129 void operator=(const vtkColorTransferControlPointsItem&) = delete;
130};
131
132#endif
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.
virtual vtkIdType RemovePoint(double *pos)=0
Remove a point of the function.
a simple class to control print indentation
Definition vtkIndent.h:40
int vtkIdType
Definition vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287