VTK  9.2.5
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 
31 #ifndef vtkColorTransferControlPointsItem_h
32 #define vtkColorTransferControlPointsItem_h
33 
34 #include "vtkChartsCoreModule.h" // For export macro
35 #include "vtkControlPointsItem.h"
36 
38 
39 class VTKCHARTSCORE_EXPORT vtkColorTransferControlPointsItem : public vtkControlPointsItem
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
49 
54 
56 
59  vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction);
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 
88  using Superclass::RemovePoint;
89 
95  vtkIdType RemovePoint(double* pos) override;
96 
98 
103  vtkSetMacro(ColorFill, bool);
104  vtkGetMacro(ColorFill, bool);
106 
107 protected:
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 
124  vtkColorTransferFunction* ColorTransferFunction = nullptr;
125  bool ColorFill = false;
126 
127 private:
129  void operator=(const vtkColorTransferControlPointsItem&) = delete;
130 };
131 
132 #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...
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
static vtkColorTransferControlPointsItem * New()
Creates a piecewise control points object.
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.
Definition: vtkContext2D.h:77
Abstract class for control points items.
a simple class to control print indentation
Definition: vtkIndent.h:119
@ point
Definition: vtkX3D.h:242
@ index
Definition: vtkX3D.h:252
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287