VTK  9.1.0
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
28#ifndef vtkColorTransferControlPointsItem_h
29#define vtkColorTransferControlPointsItem_h
30
31#include "vtkChartsCoreModule.h" // For export macro
33
35
37{
38public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
46
51
53
56 vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction);
58
62 vtkIdType GetNumberOfPoints() const override;
63
69 void GetControlPoint(vtkIdType index, double* point) const override;
70
76 void SetControlPoint(vtkIdType index, double* point) override;
77
83 vtkIdType AddPoint(double* newPos) override;
84
85 using Superclass::RemovePoint;
86
92 vtkIdType RemovePoint(double* pos) override;
93
95
100 vtkSetMacro(ColorFill, bool);
101 vtkGetMacro(ColorFill, bool);
103
104protected:
107
108 void emitEvent(unsigned long event, void* params) override;
109
111
112 void DrawPoint(vtkContext2D* painter, vtkIdType index) override;
113 void EditPoint(float tX, float tY) override;
114
119 void ComputeBounds(double* bounds) override;
120
121 vtkColorTransferFunction* ColorTransferFunction = nullptr;
122 bool ColorFill = false;
123
124private:
126 void operator=(const vtkColorTransferControlPointsItem&) = delete;
127};
128
129#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.
Definition: vtkContext2D.h:73
Abstract class for control points items.
a simple class to control print indentation
Definition: vtkIndent.h:113
@ point
Definition: vtkX3D.h:242
@ function
Definition: vtkX3D.h:255
@ index
Definition: vtkX3D.h:252
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287