VTK
dox/Charts/vtkColorTransferControlPointsItem.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkColorTransferControlPointsItem.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 
00030 #ifndef __vtkColorTransferControlPointsItem_h
00031 #define __vtkColorTransferControlPointsItem_h
00032 
00033 #include "vtkControlPointsItem.h"
00034 
00035 class vtkColorTransferFunction;
00036 
00037 class VTK_CHARTS_EXPORT vtkColorTransferControlPointsItem: public vtkControlPointsItem
00038 {
00039 public:
00040   vtkTypeMacro(vtkColorTransferControlPointsItem, vtkControlPointsItem);
00041   virtual void PrintSelf(ostream &os, vtkIndent indent);
00042 
00044   static vtkColorTransferControlPointsItem* New();
00045 
00047   void SetColorTransferFunction(vtkColorTransferFunction* function);
00049 
00050   vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction);
00052 
00054   virtual vtkIdType GetNumberOfPoints()const;
00055 
00059   virtual void GetControlPoint(vtkIdType index, double *point)const;
00060 
00064   virtual void SetControlPoint(vtkIdType index, double *point);
00065 
00069   virtual vtkIdType AddPoint(double* newPos);
00070 
00074   virtual vtkIdType RemovePoint(double* pos);
00075 
00077 
00079   vtkSetMacro(ColorFill, bool);
00080   vtkGetMacro(ColorFill, bool);
00082 
00083 protected:
00084   vtkColorTransferControlPointsItem();
00085   virtual ~vtkColorTransferControlPointsItem();
00086 
00087   virtual void emitEvent(unsigned long event, void* params);
00088 
00089   virtual unsigned long int GetControlPointsMTime();
00090 
00091   virtual void DrawPoint(vtkContext2D* painter, vtkIdType index);
00092   virtual void EditPoint(float tX, float tY);
00093 
00094   vtkColorTransferFunction* ColorTransferFunction;
00095 
00096   bool ColorFill;
00097 private:
00098   vtkColorTransferControlPointsItem(const vtkColorTransferControlPointsItem &); // Not implemented.
00099   void operator=(const vtkColorTransferControlPointsItem &);   // Not implemented.
00100 };
00101 
00102 #endif