forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkXYPlotRepresentation.h
183 lines (162 loc) · 5.07 KB
/
vtkXYPlotRepresentation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
/*=========================================================================
Program: Visualization Toolkit
Module: vtkScalarBarRepresentation.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkXYPlotRepresentation
* @brief represent XY plot for vtkXYPlotWidget
*
*
*
* This class represents a XY plot for a vtkXYPlotWidget. This class
* provides support for interactively placing a XY plot on the 2D overlay
* plane. The XY plot is defined by an instance of vtkXYPlotActor.
*
* @sa
* vtkXYPlotWidget vtkWidgetRepresentation vtkXYPlotActor
*
* @par Thanks:
* This class was written by Philippe Pebay, Kitware SAS 2012
*/
#ifndef vtkXYPlotRepresentation_h
#define vtkXYPlotRepresentation_h
#include "vtkInteractionWidgetsModule.h" // For export macro
#include "vtkBorderRepresentation.h"
class vtkXYPlotActor;
class VTKINTERACTIONWIDGETS_EXPORT vtkXYPlotRepresentation : public vtkBorderRepresentation
{
public:
vtkTypeMacro(vtkXYPlotRepresentation, vtkBorderRepresentation);
virtual void PrintSelf(ostream &os, vtkIndent indent);
static vtkXYPlotRepresentation *New();
//@{
/**
* The prop that is placed in the renderer.
*/
vtkGetObjectMacro(XYPlotActor, vtkXYPlotActor);
virtual void SetXYPlotActor(vtkXYPlotActor *);
//@}
//@{
/**
* Satisfy the superclass' API.
*/
void BuildRepresentation() override;
void WidgetInteraction(double eventPos[2]) override;
void GetSize(double size[2]) override
{size[0]=2.0; size[1]=2.0;}
//@}
//@{
/**
* These methods are necessary to make this representation behave as
* a vtkProp.
*/
virtual int GetVisibility();
virtual void SetVisibility(int);
virtual void GetActors2D(vtkPropCollection *collection);
virtual void ReleaseGraphicsResources(vtkWindow *window);
virtual int RenderOverlay(vtkViewport*);
virtual int RenderOpaqueGeometry(vtkViewport*);
virtual int RenderTranslucentPolygonalGeometry(vtkViewport*);
virtual vtkTypeBool HasTranslucentPolygonalGeometry();
//@}
//@{
/**
* Set glyph properties
*/
void SetGlyphSize(double x);
void SetPlotGlyphType(int curve, int glyph);
//@}
//@{
/**
* Set title properties
*/
void SetTitle(const char* title);
void SetTitleColor(double r, double g, double b);
void SetTitleFontFamily(int x);
void SetTitleBold(int x);
void SetTitleItalic(int x);
void SetTitleShadow(int x);
void SetTitleFontSize(int x);
void SetTitleJustification(int x);
void SetTitleVerticalJustification(int x);
void SetAdjustTitlePosition(int x);
void SetTitlePosition(double x, double y);
//@}
//@{
/**
* Set/Get axis properties
*/
void SetXAxisColor(double r, double g, double b);
void SetYAxisColor(double r, double g, double b);
void SetXTitle( const char* ytitle );
char* GetXTitle();
void SetXRange(double min, double max);
void SetYTitle( const char* ytitle );
char* GetYTitle();
void SetYRange(double min, double max);
void SetYTitlePosition (int pos);
int GetYTitlePosition() const;
void SetXValues(int x);
//@}
//@{
/**
* Set axis title properties
*/
void SetAxisTitleColor(double r, double g, double b);
void SetAxisTitleFontFamily(int x);
void SetAxisTitleBold(int x);
void SetAxisTitleItalic(int x);
void SetAxisTitleShadow(int x);
void SetAxisTitleFontSize(int x);
void SetAxisTitleJustification(int x);
void SetAxisTitleVerticalJustification(int x);
//@}
//@{
/**
* Set axis label properties
*/
void SetAxisLabelColor(double r, double g, double b);
void SetAxisLabelFontFamily(int x);
void SetAxisLabelBold(int x);
void SetAxisLabelItalic(int x);
void SetAxisLabelShadow(int x);
void SetAxisLabelFontSize(int x);
void SetAxisLabelJustification(int x);
void SetAxisLabelVerticalJustification(int x);
void SetXLabelFormat(const char* _arg);
void SetYLabelFormat(const char* _arg);
//@}
//@{
/**
* Set various properties
*/
void SetBorder(int x);
void RemoveAllActiveCurves();
void AddUserCurvesPoint( double c, double x, double y);
void SetLegend(int x);
void SetLegendBorder(int b);
void SetLegendBox(int b);
void SetLegendBoxColor(double r, double g, double b);
void SetLegendPosition(double x, double y);
void SetLegendPosition2(double x, double y);
void SetLineWidth(double w);
void SetPlotColor(int i, int r, int g, int b);
void SetPlotLines(int i);
void SetPlotPoints(int i);
void SetPlotLabel(int i, const char* label);
//@}
protected:
vtkXYPlotRepresentation();
~vtkXYPlotRepresentation();
vtkXYPlotActor *XYPlotActor;
private:
vtkXYPlotRepresentation(const vtkXYPlotRepresentation &) = delete;
void operator=(const vtkXYPlotRepresentation &) = delete;
};
#endif //vtkXYPlotRepresentation_h