VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Charts
vtkPlotBar.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkPlotBar.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
27
#ifndef __vtkPlotBar_h
28
#define __vtkPlotBar_h
29
30
#include "
vtkPlot.h
"
31
#include "
vtkSmartPointer.h
"
// Needed to hold ColorSeries
32
33
class
vtkContext2D
;
34
class
vtkTable
;
35
class
vtkPoints2D
;
36
class
vtkStdString
;
37
class
vtkColorSeries
;
38
39
class
vtkPlotBarPrivate;
40
41
class
VTK_CHARTS_EXPORT
vtkPlotBar
:
public
vtkPlot
42
{
43
public
:
44
vtkTypeMacro(
vtkPlotBar
,
vtkPlot
);
45
virtual
void
PrintSelf
(ostream &os,
vtkIndent
indent);
46
48
49
enum
{
50
VERTICAL = 0,
51
HORIZONTAL
52
};
54
56
static
vtkPlotBar
*
New
();
57
60
virtual
bool
Paint
(
vtkContext2D
*painter);
61
63
68
virtual
bool
PaintLegend
(
vtkContext2D
*painter,
const
vtkRectf
& rect,
69
int
legendIndex);
71
73
74
virtual
void
SetColor
(
unsigned
char
r,
unsigned
char
g,
unsigned
char
b,
75
unsigned
char
a);
76
virtual
void
SetColor
(
double
r,
double
g,
double
b);
77
virtual
void
GetColor
(
double
rgb[3]);
79
81
82
vtkSetMacro(Width,
float
);
84
86
87
vtkGetMacro(Width,
float
);
89
91
94
vtkSetMacro(Offset,
float
);
95
vtkGetMacro(Offset,
float
);
97
99
101
virtual
void
SetOrientation(
int
orientation
);
102
vtkGetMacro(Orientation,
int
);
104
106
virtual
void
GetBounds
(
double
bounds[4]);
107
109
virtual
void
SetInputArray
(
int
index
,
const
vtkStdString
&
name
);
110
112
void
SetColorSeries(
vtkColorSeries
*colorSeries);
113
115
vtkColorSeries
*GetColorSeries();
116
118
virtual
vtkStringArray
*
GetLabels
();
119
121
virtual
void
SetGroupName(
const
vtkStdString
&
name
);
122
124
virtual
vtkStdString
GetGroupName();
125
127
129
virtual
vtkStdString
GetTooltipLabel
(
const
vtkVector2f
&plotPos,
130
vtkIdType
seriesIndex,
131
vtkIdType
segmentIndex);
133
135
virtual
bool
SelectPoints
(
const
vtkVector2f
& min,
const
vtkVector2f
&
max
);
136
137
//BTX
139
142
virtual
vtkIdType
GetNearestPoint
(
const
vtkVector2f
&
point
,
143
const
vtkVector2f
& tolerance,
144
vtkVector2f
*
location
);
146
148
153
virtual
vtkIdType
GetNearestPoint
(
const
vtkVector2f
&
point
,
154
const
vtkVector2f
&,
155
vtkVector2f
*
location
,
156
vtkIdType
* segmentIndex);
158
159
protected
:
160
vtkPlotBar
();
161
~
vtkPlotBar
();
162
164
bool
UpdateTableCache(
vtkTable
*table);
165
167
vtkPoints2D
*
Points
;
168
169
float
Width
;
170
float
Offset
;
171
172
int
Orientation
;
173
175
vtkTimeStamp
BuildTime
;
176
178
vtkSmartPointer<vtkColorSeries>
ColorSeries
;
179
180
private
:
181
vtkPlotBar
(
const
vtkPlotBar
&);
// Not implemented.
182
void
operator=(
const
vtkPlotBar
&);
// Not implemented.
183
184
vtkPlotBarPrivate *Private;
185
186
//ETX
187
};
188
189
#endif //__vtkPlotBar_h
Generated on Wed Nov 21 2012 21:33:39 for VTK by
1.8.2