VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Charts
vtkColorLegend.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkColorLegend.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
23
#ifndef __vtkColorLegend_h
24
#define __vtkColorLegend_h
25
26
#include "
vtkChartLegend.h
"
27
#include "
vtkSmartPointer.h
"
// For SP ivars
28
#include "
vtkVector.h
"
// For vtkRectf
29
30
class
vtkAxis
;
31
class
vtkImageData
;
32
class
vtkScalarsToColors
;
33
class
vtkCallbackCommand
;
34
35
class
VTK_CHARTS_EXPORT
vtkColorLegend
:
public
vtkChartLegend
36
{
37
public
:
38
vtkTypeMacro(
vtkColorLegend
,
vtkChartLegend
);
39
virtual
void
PrintSelf
(ostream &os,
vtkIndent
indent);
40
static
vtkColorLegend
*
New
();
41
44
virtual
void
GetBounds(
double
bounds[4]);
45
49
virtual
void
Update
();
50
54
virtual
bool
Paint
(
vtkContext2D
*painter);
55
56
virtual
void
SetTransferFunction(
vtkScalarsToColors
* transfer);
57
virtual
vtkScalarsToColors
* GetTransferFunction();
58
59
virtual
void
SetPosition(
const
vtkRectf
& pos);
60
virtual
vtkRectf
GetPosition();
61
67
vtkRectf
GetBoundingRect
(
vtkContext2D
* painter);
68
69
protected
:
70
vtkColorLegend
();
71
virtual
~
vtkColorLegend
();
72
76
virtual
void
ComputeTexture();
77
79
81
virtual
void
ScalarsToColorsModified(
vtkObject
* caller,
unsigned
long
eid,
82
void
* calldata);
83
static
void
OnScalarsToColorsModified(
vtkObject
* caller,
unsigned
long
eid,
84
void
*clientdata,
void
* calldata);
86
87
vtkScalarsToColors
*
TransferFunction
;
88
vtkSmartPointer<vtkImageData>
ImageData
;
89
vtkSmartPointer<vtkAxis>
Axis
;
90
vtkSmartPointer<vtkCallbackCommand>
Callback
;
91
bool
Interpolate
;
92
vtkRectf
Position
;
93
94
private
:
95
vtkColorLegend
(
const
vtkColorLegend
&);
// Not implemented.
96
void
operator=(
const
vtkColorLegend
&);
// Not implemented.
97
};
98
99
#endif
Generated on Sun Sep 15 2013 03:44:18 for VTK by
1.8.4