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 =========================================================================*/
40 #ifndef vtkLegendScaleActor_h
41 #define vtkLegendScaleActor_h
42 
43 #include "vtkRenderingAnnotationModule.h" // For export macro
44 #include "vtkProp.h"
45 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
46 
47 class vtkAxisActor2D;
48 class vtkTextProperty;
49 class vtkPolyData;
51 class vtkActor2D;
52 class vtkTextMapper;
53 class vtkPoints;
54 class vtkCoordinate;
55 
56 class VTKRENDERINGANNOTATION_EXPORT vtkLegendScaleActor : public vtkProp
57 {
58 public:
63 
65 
69  void PrintSelf(ostream& os, vtkIndent indent);
71 
73  {
74  DISTANCE=0,
75  XY_COORDINATES=1
76  };
77 
79 
85  vtkSetClampMacro(LabelMode,int,DISTANCE,XY_COORDINATES);
86  vtkGetMacro(LabelMode,int);
87  void SetLabelModeToDistance() {this->SetLabelMode(DISTANCE);}
88  void SetLabelModeToXYCoordinates() {this->SetLabelMode(XY_COORDINATES);}
90 
92 
96  vtkSetMacro(RightAxisVisibility,int);
97  vtkGetMacro(RightAxisVisibility,int);
98  vtkBooleanMacro(RightAxisVisibility,int);
99  vtkSetMacro(TopAxisVisibility,int);
100  vtkGetMacro(TopAxisVisibility,int);
101  vtkBooleanMacro(TopAxisVisibility,int);
102  vtkSetMacro(LeftAxisVisibility,int);
103  vtkGetMacro(LeftAxisVisibility,int);
104  vtkBooleanMacro(LeftAxisVisibility,int);
105  vtkSetMacro(BottomAxisVisibility,int);
106  vtkGetMacro(BottomAxisVisibility,int);
107  vtkBooleanMacro(BottomAxisVisibility,int);
109 
111 
115  vtkSetMacro(LegendVisibility,int);
116  vtkGetMacro(LegendVisibility,int);
117  vtkBooleanMacro(LegendVisibility,int);
119 
121 
124  void AllAxesOn();
125  void AllAxesOff();
127 
129 
135 
137 
142  vtkSetClampMacro(RightBorderOffset,int,5,VTK_INT_MAX);
143  vtkGetMacro(RightBorderOffset,int);
145 
147 
152  vtkSetClampMacro(TopBorderOffset,int,5,VTK_INT_MAX);
153  vtkGetMacro(TopBorderOffset,int);
155 
157 
162  vtkSetClampMacro(LeftBorderOffset,int,5,VTK_INT_MAX);
163  vtkGetMacro(LeftBorderOffset,int);
165 
167 
172  vtkSetClampMacro(BottomBorderOffset,int,5,VTK_INT_MAX);
173  vtkGetMacro(BottomBorderOffset,int);
175 
177 
181  vtkSetClampMacro(CornerOffsetFactor, double, 1.0, 10.0);
182  vtkGetMacro(CornerOffsetFactor, double);
184 
186 
189  vtkGetObjectMacro(LegendTitleProperty,vtkTextProperty);
190  vtkGetObjectMacro(LegendLabelProperty,vtkTextProperty);
192 
194 
199  vtkGetObjectMacro(RightAxis,vtkAxisActor2D);
200  vtkGetObjectMacro(TopAxis,vtkAxisActor2D);
201  vtkGetObjectMacro(LeftAxis,vtkAxisActor2D);
202  vtkGetObjectMacro(BottomAxis,vtkAxisActor2D);
204 
206 
209  virtual void BuildRepresentation(vtkViewport *viewport);
212  virtual int RenderOverlay(vtkViewport*);
215 
216 protected:
219 
226 
227  // The four axes around the borders of the renderer
232 
233  // Control the display of the axes
238 
239  // Support for the legend.
245  vtkTextMapper *LabelMappers[6];
246  vtkActor2D *LabelActors[6];
250 
252 
253 private:
254  vtkLegendScaleActor(const vtkLegendScaleActor&) VTK_DELETE_FUNCTION;
255  void operator=(const vtkLegendScaleActor&) VTK_DELETE_FUNCTION;
256 };
257 
258 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:40
vtkLegendScaleActor::RenderOverlay
virtual int RenderOverlay(vtkViewport *)
vtkLegendScaleActor::Legend
vtkPolyData * Legend
Definition: vtkLegendScaleActor.h:241
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:153
vtkLegendScaleActor::TopAxis
vtkAxisActor2D * TopAxis
Definition: vtkLegendScaleActor.h:229
vtkLegendScaleActor::SetLabelModeToXYCoordinates
void SetLabelModeToXYCoordinates()
Definition: vtkLegendScaleActor.h:88
vtkLegendScaleActor::BottomAxisVisibility
int BottomAxisVisibility
Definition: vtkLegendScaleActor.h:237
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:52
vtkLegendScaleActor::BuildRepresentation
virtual void BuildRepresentation(vtkViewport *viewport)
Standard methods supporting the rendering process.
vtkLegendScaleActor::TopAxisVisibility
int TopAxisVisibility
Definition: vtkLegendScaleActor.h:235
vtkLegendScaleActor::BottomAxis
vtkAxisActor2D * BottomAxis
Definition: vtkLegendScaleActor.h:231
vtkLegendScaleActor::LegendVisibility
int LegendVisibility
Definition: vtkLegendScaleActor.h:240
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkLegendScaleActor::LeftAxisVisibility
int LeftAxisVisibility
Definition: vtkLegendScaleActor.h:236
vtkLegendScaleActor::BuildTime
vtkTimeStamp BuildTime
Definition: vtkLegendScaleActor.h:251
vtkLegendScaleActor::CornerOffsetFactor
double CornerOffsetFactor
Definition: vtkLegendScaleActor.h:225
vtkLegendScaleActor::RightBorderOffset
int RightBorderOffset
Definition: vtkLegendScaleActor.h:221
vtkLegendScaleActor::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkLegendScaleActor::AllAnnotationsOn
void AllAnnotationsOn()
Convenience method that turns all the axes and the legend scale.
vtkLegendScaleActor::vtkLegendScaleActor
vtkLegendScaleActor()
vtkProp.h
vtkLegendScaleActor::~vtkLegendScaleActor
~vtkLegendScaleActor()
vtkLegendScaleActor::LegendMapper
vtkPolyDataMapper2D * LegendMapper
Definition: vtkLegendScaleActor.h:243
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkLegendScaleActor::LegendTitleProperty
vtkTextProperty * LegendTitleProperty
Definition: vtkLegendScaleActor.h:247
vtkTextMapper
2D text annotation
Definition: vtkTextMapper.h:54
vtkLegendScaleActor
annotate the render window with scale and distance information
Definition: vtkLegendScaleActor.h:57
vtkLegendScaleActor::LabelMode
int LabelMode
Definition: vtkLegendScaleActor.h:220
vtkLegendScaleActor::LeftAxis
vtkAxisActor2D * LeftAxis
Definition: vtkLegendScaleActor.h:230
vtkLegendScaleActor::New
static vtkLegendScaleActor * New()
Instantiate the class.
vtkLegendScaleActor::GetActors2D
virtual void GetActors2D(vtkPropCollection *)
vtkLegendScaleActor::BottomBorderOffset
int BottomBorderOffset
Definition: vtkLegendScaleActor.h:224
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkLegendScaleActor::AllAnnotationsOff
void AllAnnotationsOff()
vtkCoordinate
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:71
vtkLegendScaleActor::RightAxisVisibility
int RightAxisVisibility
Definition: vtkLegendScaleActor.h:234
vtkLegendScaleActor::LegendLabelProperty
vtkTextProperty * LegendLabelProperty
Definition: vtkLegendScaleActor.h:248
vtkLegendScaleActor::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:48
vtkCoordinate.h
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:40
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:46
vtkLegendScaleActor::AllAxesOn
void AllAxesOn()
Convenience method that turns all the axes either on or off.
vtkLegendScaleActor::AllAxesOff
void AllAxesOff()
vtkLegendScaleActor::LegendActor
vtkActor2D * LegendActor
Definition: vtkLegendScaleActor.h:244
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkAxisActor2D
Create an axis with tick marks and labels.
Definition: vtkAxisActor2D.h:73
vtkLegendScaleActor::AttributeLocation
AttributeLocation
Definition: vtkLegendScaleActor.h:73
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:39
vtkLegendScaleActor::SetLabelModeToDistance
void SetLabelModeToDistance()
Definition: vtkLegendScaleActor.h:87
vtkLegendScaleActor::LegendPoints
vtkPoints * LegendPoints
Definition: vtkLegendScaleActor.h:242
vtkLegendScaleActor::LeftBorderOffset
int LeftBorderOffset
Definition: vtkLegendScaleActor.h:223
vtkLegendScaleActor::Coordinate
vtkCoordinate * Coordinate
Definition: vtkLegendScaleActor.h:249
vtkLegendScaleActor::TopBorderOffset
int TopBorderOffset
Definition: vtkLegendScaleActor.h:222
vtkLegendScaleActor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkLegendScaleActor::RightAxis
vtkAxisActor2D * RightAxis
Definition: vtkLegendScaleActor.h:228