VTK
vtkLegendScaleActor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLegendScaleActor.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 =========================================================================*/
39 #ifndef __vtkLegendScaleActor_h
40 #define __vtkLegendScaleActor_h
41 
42 #include "vtkProp.h"
43 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
44 
45 class vtkAxisActor2D;
46 class vtkTextProperty;
47 class vtkPolyData;
49 class vtkActor2D;
50 class vtkTextMapper;
51 class vtkPoints;
52 class vtkCoordinate;
53 
55 {
56 public:
58  static vtkLegendScaleActor *New();
59 
61 
63  void PrintSelf(ostream& os, vtkIndent indent);
65 
66 //BTX
68  {
69  DISTANCE=0,
70  XY_COORDINATES=1
71  };
72 //ETX
73 
75 
79  vtkSetClampMacro(LabelMode,int,DISTANCE,XY_COORDINATES);
80  vtkGetMacro(LabelMode,int);
81  void SetLabelModeToDistance() {this->SetLabelMode(DISTANCE);}
82  void SetLabelModeToXYCoordinates() {this->SetLabelMode(XY_COORDINATES);}
84 
86 
89  vtkSetMacro(RightAxisVisibility,int);
90  vtkGetMacro(RightAxisVisibility,int);
91  vtkBooleanMacro(RightAxisVisibility,int);
92  vtkSetMacro(TopAxisVisibility,int);
93  vtkGetMacro(TopAxisVisibility,int);
94  vtkBooleanMacro(TopAxisVisibility,int);
95  vtkSetMacro(LeftAxisVisibility,int);
96  vtkGetMacro(LeftAxisVisibility,int);
97  vtkBooleanMacro(LeftAxisVisibility,int);
98  vtkSetMacro(BottomAxisVisibility,int);
99  vtkGetMacro(BottomAxisVisibility,int);
100  vtkBooleanMacro(BottomAxisVisibility,int);
102 
104 
106  vtkSetMacro(LegendVisibility,int);
107  vtkGetMacro(LegendVisibility,int);
108  vtkBooleanMacro(LegendVisibility,int);
110 
112 
113  void AllAxesOn();
114  void AllAxesOff();
116 
118 
119  void AllAnnotationsOn();
120  void AllAnnotationsOff();
122 
124 
127  vtkSetClampMacro(RightBorderOffset,int,5,VTK_LARGE_INTEGER);
128  vtkGetMacro(RightBorderOffset,int);
130 
132 
135  vtkSetClampMacro(TopBorderOffset,int,5,VTK_LARGE_INTEGER);
136  vtkGetMacro(TopBorderOffset,int);
138 
140 
143  vtkSetClampMacro(LeftBorderOffset,int,5,VTK_LARGE_INTEGER);
144  vtkGetMacro(LeftBorderOffset,int);
146 
148 
151  vtkSetClampMacro(BottomBorderOffset,int,5,VTK_LARGE_INTEGER);
152  vtkGetMacro(BottomBorderOffset,int);
154 
156 
158  vtkSetClampMacro(CornerOffsetFactor, double, 1.0, 10.0);
159  vtkGetMacro(CornerOffsetFactor, double);
161 
163 
164  vtkGetObjectMacro(LegendTitleProperty,vtkTextProperty);
165  vtkGetObjectMacro(LegendLabelProperty,vtkTextProperty);
167 
169 
172  vtkGetObjectMacro(RightAxis,vtkAxisActor2D);
173  vtkGetObjectMacro(TopAxis,vtkAxisActor2D);
174  vtkGetObjectMacro(LeftAxis,vtkAxisActor2D);
175  vtkGetObjectMacro(BottomAxis,vtkAxisActor2D);
177 
179 
180  virtual void BuildRepresentation(vtkViewport *viewport);
181  virtual void GetActors2D(vtkPropCollection*);
182  virtual void ReleaseGraphicsResources(vtkWindow*);
183  virtual int RenderOverlay(vtkViewport*);
184  virtual int RenderOpaqueGeometry(vtkViewport*);
186 
187 protected:
190 
197 
198  // The four axes around the borders of the renderer
203 
204  // Control the display of the axes
209 
210  // Support for the legend.
216  vtkTextMapper *LabelMappers[6];
217  vtkActor2D *LabelActors[6];
221 
223 
224 private:
225  vtkLegendScaleActor(const vtkLegendScaleActor&); //Not implemented
226  void operator=(const vtkLegendScaleActor&); //Not implemented
227 };
228 
229 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
void PrintSelf(ostream &os, vtkIndent indent)
abstract specification for Viewports
Definition: vtkViewport.h:45
virtual int RenderOpaqueGeometry(vtkViewport *)
Definition: vtkProp.h:171
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:174
vtkAxisActor2D * RightAxis
a actor that draws 2D data
Definition: vtkActor2D.h:43
record modification and/or execution time
Definition: vtkTimeStamp.h:33
Create an axis with tick marks and labels.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
vtkPolyDataMapper2D * LegendMapper
2D text annotation
Definition: vtkTextMapper.h:43
annotate the render window with scale and distance information
a list of Props
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition: vtkProp.h:236
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkAxisActor2D * TopAxis
a simple class to control print indentation
Definition: vtkIndent.h:37
vtkAxisActor2D * LeftAxis
represent text properties.
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:68
virtual void GetActors2D(vtkPropCollection *)
Definition: vtkProp.h:60
vtkCoordinate * Coordinate
vtkAxisActor2D * BottomAxis
vtkTextProperty * LegendTitleProperty
#define VTK_LARGE_INTEGER
Definition: vtkType.h:148
static vtkObject * New()
#define VTK_HYBRID_EXPORT
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:38
vtkTextProperty * LegendLabelProperty