VTK
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  virtual void PrintSelf(ostream &os, vtkIndent indent);
44 
49 
55 
58  vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction);
60 
64  virtual vtkIdType GetNumberOfPoints()const;
65 
71  virtual void GetControlPoint(vtkIdType index, double *point)const;
72 
78  virtual void SetControlPoint(vtkIdType index, double *point);
79 
85  virtual vtkIdType AddPoint(double* newPos);
86 
92  virtual vtkIdType RemovePoint(double* pos);
93 
95 
100  vtkSetMacro(ColorFill, bool);
101  vtkGetMacro(ColorFill, bool);
103 
104 protected:
107 
113  virtual bool UsingLogScale();
114 
115  virtual void emitEvent(unsigned long event, void* params);
116 
118 
119  virtual void DrawPoint(vtkContext2D* painter, vtkIdType index);
120  virtual void EditPoint(float tX, float tY);
121 
126  virtual void ComputeBounds(double* bounds);
127 
129 
130  bool ColorFill;
131 private:
133  void operator=(const vtkColorTransferControlPointsItem &) VTK_DELETE_FUNCTION;
134 };
135 
136 #endif
Control points for vtkColorTransferFunction.
virtual bool UsingLogScale()
Returns true if control points are to be rendered in log-space.
virtual vtkIdType RemovePoint(double *pos)
Remove a point of the function.
virtual void GetControlPoint(vtkIdType index, double *point) const
Returns the x and y coordinates as well as the midpoint and sharpness of the control point correspond...
virtual void SetControlPoint(vtkIdType index, double *point)
Sets the x and y coordinates as well as the midpoint and sharpness of the control point corresponding...
virtual vtkIdType AddPoint(double *newPos)
Add a point to the function.
virtual void DrawPoint(vtkContext2D *painter, vtkIdType index)
virtual void ComputeBounds(double *bounds)
Compute the bounds for this item.
virtual vtkMTimeType GetControlPointsMTime()
void SetColorTransferFunction(vtkColorTransferFunction *function)
Set the piecewise function to draw its points.
virtual void emitEvent(unsigned long event, void *params)
virtual void EditPoint(float tX, float tY)
static vtkColorTransferControlPointsItem * New()
Creates a piecewise control points object.
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual vtkIdType GetNumberOfPoints() const
Return the number of points in the color transfer function.
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:58
Abstract class for control points items.
a simple class to control print indentation
Definition: vtkIndent.h:40
@ point
Definition: vtkX3D.h:236
@ index
Definition: vtkX3D.h:246
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248