VTK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dox
Charts
Core
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 "
vtkChartsCoreModule.h
"
// For export macro
27
#include "
vtkChartLegend.h
"
28
#include "
vtkSmartPointer.h
"
// For SP ivars
29
#include "
vtkVector.h
"
// For vtkRectf
30
31
class
vtkAxis
;
32
class
vtkContextMouseEvent
;
33
class
vtkImageData
;
34
class
vtkScalarsToColors
;
35
class
vtkCallbackCommand
;
36
37
class
VTKCHARTSCORE_EXPORT
vtkColorLegend
:
public
vtkChartLegend
38
{
39
public
:
40
vtkTypeMacro(
vtkColorLegend
,
vtkChartLegend
);
41
virtual
void
PrintSelf
(ostream &os,
vtkIndent
indent);
42
static
vtkColorLegend
*
New
();
43
45
46
enum
{
47
VERTICAL = 0,
48
HORIZONTAL
49
};
51
54
virtual
void
GetBounds(
double
bounds[4]);
55
59
virtual
void
Update
();
60
64
virtual
bool
Paint
(
vtkContext2D
*painter);
65
67
69
virtual
void
SetTransferFunction(
vtkScalarsToColors
* transfer);
70
virtual
vtkScalarsToColors
* GetTransferFunction();
72
74
virtual
void
SetPoint
(
float
x,
float
y);
75
77
virtual
void
SetTextureSize(
float
w,
float
h);
78
84
virtual
void
SetPosition(
const
vtkRectf
& pos);
85
88
virtual
vtkRectf
GetPosition();
89
95
vtkRectf
GetBoundingRect
(
vtkContext2D
* painter);
96
98
100
virtual
void
SetOrientation(
int
orientation
);
101
vtkGetMacro(Orientation,
int
);
103
105
106
virtual
void
SetTitle(
const
vtkStdString
&
title
);
107
virtual
vtkStdString
GetTitle();
109
111
113
vtkSetMacro(DrawBorder,
bool
);
114
vtkGetMacro(DrawBorder,
bool
);
115
vtkBooleanMacro(DrawBorder,
bool
);
117
119
virtual
bool
MouseMoveEvent
(
const
vtkContextMouseEvent
&mouse);
120
121
protected
:
122
vtkColorLegend
();
123
virtual
~
vtkColorLegend
();
124
128
virtual
void
ComputeTexture();
129
131
133
virtual
void
ScalarsToColorsModified(
vtkObject
* caller,
unsigned
long
eid,
134
void
* calldata);
135
static
void
OnScalarsToColorsModified(
vtkObject
* caller,
unsigned
long
eid,
136
void
*clientdata,
void
* calldata);
138
140
void
UpdateAxisPosition();
141
142
vtkScalarsToColors
*
TransferFunction
;
143
vtkSmartPointer<vtkImageData>
ImageData
;
144
vtkSmartPointer<vtkAxis>
Axis
;
145
vtkSmartPointer<vtkCallbackCommand>
Callback
;
146
bool
Interpolate
;
147
bool
CustomPositionSet
;
148
bool
DrawBorder
;
149
vtkRectf
Position
;
150
int
Orientation
;
151
152
private
:
153
vtkColorLegend
(
const
vtkColorLegend
&);
// Not implemented.
154
void
operator=(
const
vtkColorLegend
&);
// Not implemented.
155
};
156
157
#endif
vtkStdString
Wrapper around std::string to keep symbols short.
Definition:
vtkStdString.h:46
vtkColorLegend::Position
vtkRectf Position
Definition:
vtkColorLegend.h:149
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:61
vtkChartLegend::MouseMoveEvent
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
vtkChartLegend::GetBoundingRect
virtual vtkRectf GetBoundingRect(vtkContext2D *painter)
vtkColorLegend::Orientation
int Orientation
Definition:
vtkColorLegend.h:150
vtkColorLegend
Legend item to display vtkScalarsToColors.
Definition:
vtkColorLegend.h:37
vtkSmartPointer< vtkImageData >
vtkChartLegend::Update
virtual void Update()
vtkColorLegend::Callback
vtkSmartPointer< vtkCallbackCommand > Callback
Definition:
vtkColorLegend.h:145
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition:
vtkScalarsToColors.h:62
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition:
vtkContext2D.h:56
vtkCallbackCommand
supports function callbacks
Definition:
vtkCallbackCommand.h:49
vtkRectf
Definition:
vtkRect.h:263
vtkAxis
takes care of drawing 2D axes
Definition:
vtkAxis.h:70
vtkContextMouseEvent
data structure to represent mouse events.
Definition:
vtkContextMouseEvent.h:39
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:38
vtkChartLegend::New
static vtkChartLegend * New()
vtkImageData
topologically and geometrically regular array of data
Definition:
vtkImageData.h:44
vtkChartLegend::SetPoint
virtual void SetPoint(float, float)
vtkChartLegend.h
vtkVector.h
vtkColorLegend::TransferFunction
vtkScalarsToColors * TransferFunction
Definition:
vtkColorLegend.h:142
vtkSmartPointer.h
vtkColorLegend::ImageData
vtkSmartPointer< vtkImageData > ImageData
Definition:
vtkColorLegend.h:143
vtkChartLegend
draw the chart legend
Definition:
vtkChartLegend.h:41
vtkChartLegend::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkColorLegend::Interpolate
bool Interpolate
Definition:
vtkColorLegend.h:146
vtkX3D::orientation
Definition:
vtkX3D.h:262
vtkChartLegend::Paint
virtual bool Paint(vtkContext2D *painter)
vtkColorLegend::Axis
vtkSmartPointer< vtkAxis > Axis
Definition:
vtkColorLegend.h:144
vtkColorLegend::DrawBorder
bool DrawBorder
Definition:
vtkColorLegend.h:148
VTKCHARTSCORE_EXPORT
#define VTKCHARTSCORE_EXPORT
Definition:
vtkChartsCoreModule.h:15
vtkColorLegend::CustomPositionSet
bool CustomPositionSet
Definition:
vtkColorLegend.h:147
vtkChartsCoreModule.h
vtkX3D::title
Definition:
vtkX3D.h:500
Generated on Wed Dec 16 2015 17:14:46 for VTK by
1.8.9.1