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 "vtkRenderingAnnotationModule.h" // For export macro
43 #include "vtkProp.h"
44 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
45 
46 class vtkAxisActor2D;
47 class vtkTextProperty;
48 class vtkPolyData;
50 class vtkActor2D;
51 class vtkTextMapper;
52 class vtkPoints;
53 class vtkCoordinate;
54 
56 {
57 public:
60 
62 
64  void PrintSelf(ostream& os, vtkIndent indent);
66 
67 //BTX
69  {
70  DISTANCE=0,
71  XY_COORDINATES=1
72  };
73 //ETX
74 
76 
80  vtkSetClampMacro(LabelMode,int,DISTANCE,XY_COORDINATES);
81  vtkGetMacro(LabelMode,int);
82  void SetLabelModeToDistance() {this->SetLabelMode(DISTANCE);}
83  void SetLabelModeToXYCoordinates() {this->SetLabelMode(XY_COORDINATES);}
85 
87 
90  vtkSetMacro(RightAxisVisibility,int);
91  vtkGetMacro(RightAxisVisibility,int);
92  vtkBooleanMacro(RightAxisVisibility,int);
93  vtkSetMacro(TopAxisVisibility,int);
94  vtkGetMacro(TopAxisVisibility,int);
95  vtkBooleanMacro(TopAxisVisibility,int);
96  vtkSetMacro(LeftAxisVisibility,int);
97  vtkGetMacro(LeftAxisVisibility,int);
98  vtkBooleanMacro(LeftAxisVisibility,int);
99  vtkSetMacro(BottomAxisVisibility,int);
100  vtkGetMacro(BottomAxisVisibility,int);
101  vtkBooleanMacro(BottomAxisVisibility,int);
103 
105 
107  vtkSetMacro(LegendVisibility,int);
108  vtkGetMacro(LegendVisibility,int);
109  vtkBooleanMacro(LegendVisibility,int);
111 
113 
114  void AllAxesOn();
115  void AllAxesOff();
117 
119 
123 
125 
128  vtkSetClampMacro(RightBorderOffset,int,5,VTK_INT_MAX);
129  vtkGetMacro(RightBorderOffset,int);
131 
133 
136  vtkSetClampMacro(TopBorderOffset,int,5,VTK_INT_MAX);
137  vtkGetMacro(TopBorderOffset,int);
139 
141 
144  vtkSetClampMacro(LeftBorderOffset,int,5,VTK_INT_MAX);
145  vtkGetMacro(LeftBorderOffset,int);
147 
149 
152  vtkSetClampMacro(BottomBorderOffset,int,5,VTK_INT_MAX);
153  vtkGetMacro(BottomBorderOffset,int);
155 
157 
159  vtkSetClampMacro(CornerOffsetFactor, double, 1.0, 10.0);
160  vtkGetMacro(CornerOffsetFactor, double);
162 
164 
165  vtkGetObjectMacro(LegendTitleProperty,vtkTextProperty);
166  vtkGetObjectMacro(LegendLabelProperty,vtkTextProperty);
168 
170 
178 
180 
181  virtual void BuildRepresentation(vtkViewport *viewport);
184  virtual int RenderOverlay(vtkViewport*);
187 
188 protected:
191 
198 
199  // The four axes around the borders of the renderer
204 
205  // Control the display of the axes
210 
211  // Support for the legend.
217  vtkTextMapper *LabelMappers[6];
218  vtkActor2D *LabelActors[6];
222 
224 
225 private:
226  vtkLegendScaleActor(const vtkLegendScaleActor&); //Not implemented
227  void operator=(const vtkLegendScaleActor&); //Not implemented
228 };
229 
230 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkLegendScaleActor::RenderOverlay
virtual int RenderOverlay(vtkViewport *)
vtkLegendScaleActor::Legend
vtkPolyData * Legend
Definition: vtkLegendScaleActor.h:213
vtkRenderingAnnotationModule.h
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:132
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkLegendScaleActor::TopAxis
vtkAxisActor2D * TopAxis
Definition: vtkLegendScaleActor.h:201
vtkLegendScaleActor::SetLabelModeToXYCoordinates
void SetLabelModeToXYCoordinates()
Definition: vtkLegendScaleActor.h:83
vtkLegendScaleActor::BottomAxisVisibility
int BottomAxisVisibility
Definition: vtkLegendScaleActor.h:209
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:51
vtkLegendScaleActor::BuildRepresentation
virtual void BuildRepresentation(vtkViewport *viewport)
vtkLegendScaleActor::TopAxisVisibility
int TopAxisVisibility
Definition: vtkLegendScaleActor.h:207
vtkLegendScaleActor::BottomAxis
vtkAxisActor2D * BottomAxis
Definition: vtkLegendScaleActor.h:203
vtkLegendScaleActor::LegendVisibility
int LegendVisibility
Definition: vtkLegendScaleActor.h:212
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkLegendScaleActor::LeftAxisVisibility
int LeftAxisVisibility
Definition: vtkLegendScaleActor.h:208
vtkLegendScaleActor::BuildTime
vtkTimeStamp BuildTime
Definition: vtkLegendScaleActor.h:223
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkLegendScaleActor::CornerOffsetFactor
double CornerOffsetFactor
Definition: vtkLegendScaleActor.h:197
vtkLegendScaleActor::RightBorderOffset
int RightBorderOffset
Definition: vtkLegendScaleActor.h:193
vtkLegendScaleActor::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *)
vtkLegendScaleActor::AllAnnotationsOn
void AllAnnotationsOn()
vtkLegendScaleActor::vtkLegendScaleActor
vtkLegendScaleActor()
vtkProp.h
vtkLegendScaleActor::~vtkLegendScaleActor
~vtkLegendScaleActor()
vtkLegendScaleActor::LegendMapper
vtkPolyDataMapper2D * LegendMapper
Definition: vtkLegendScaleActor.h:215
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkLegendScaleActor::LegendTitleProperty
vtkTextProperty * LegendTitleProperty
Definition: vtkLegendScaleActor.h:219
vtkTextMapper
2D text annotation
Definition: vtkTextMapper.h:53
vtkLegendScaleActor
annotate the render window with scale and distance information
Definition: vtkLegendScaleActor.h:56
vtkLegendScaleActor::LabelMode
int LabelMode
Definition: vtkLegendScaleActor.h:192
vtkLegendScaleActor::LeftAxis
vtkAxisActor2D * LeftAxis
Definition: vtkLegendScaleActor.h:202
vtkLegendScaleActor::New
static vtkLegendScaleActor * New()
vtkLegendScaleActor::GetActors2D
virtual void GetActors2D(vtkPropCollection *)
vtkLegendScaleActor::BottomBorderOffset
int BottomBorderOffset
Definition: vtkLegendScaleActor.h:196
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkLegendScaleActor::AllAnnotationsOff
void AllAnnotationsOff()
vtkCoordinate
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:70
vtkLegendScaleActor::RightAxisVisibility
int RightAxisVisibility
Definition: vtkLegendScaleActor.h:206
vtkLegendScaleActor::LegendLabelProperty
vtkTextProperty * LegendLabelProperty
Definition: vtkLegendScaleActor.h:220
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkLegendScaleActor::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkCoordinate.h
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:39
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:50
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:45
vtkLegendScaleActor::AllAxesOn
void AllAxesOn()
vtkLegendScaleActor::AllAxesOff
void AllAxesOff()
vtkLegendScaleActor::LegendActor
vtkActor2D * LegendActor
Definition: vtkLegendScaleActor.h:216
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkAxisActor2D
Create an axis with tick marks and labels.
Definition: vtkAxisActor2D.h:74
vtkLegendScaleActor::AttributeLocation
AttributeLocation
Definition: vtkLegendScaleActor.h:69
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:38
vtkLegendScaleActor::SetLabelModeToDistance
void SetLabelModeToDistance()
Definition: vtkLegendScaleActor.h:82
vtkLegendScaleActor::LegendPoints
vtkPoints * LegendPoints
Definition: vtkLegendScaleActor.h:214
vtkLegendScaleActor::LeftBorderOffset
int LeftBorderOffset
Definition: vtkLegendScaleActor.h:195
vtkLegendScaleActor::Coordinate
vtkCoordinate * Coordinate
Definition: vtkLegendScaleActor.h:221
vtkLegendScaleActor::TopBorderOffset
int TopBorderOffset
Definition: vtkLegendScaleActor.h:194
vtkLegendScaleActor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
VTKRENDERINGANNOTATION_EXPORT
#define VTKRENDERINGANNOTATION_EXPORT
Definition: vtkRenderingAnnotationModule.h:15
vtkLegendScaleActor::RightAxis
vtkAxisActor2D * RightAxis
Definition: vtkLegendScaleActor.h:200