VTK
vtkLegendBoxActor.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkLegendBoxActor.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=========================================================================*/
41#ifndef vtkLegendBoxActor_h
42#define vtkLegendBoxActor_h
43
44#include "vtkRenderingAnnotationModule.h" // For export macro
45#include "vtkActor2D.h"
46
47class vtkActor;
48class vtkDoubleArray;
49class vtkImageData;
50class vtkPolyData;
53class vtkPlaneSource;
54class vtkTextMapper;
55class vtkTextProperty;
57class vtkTransform;
59class vtkProperty2D;
60
61class VTKRENDERINGANNOTATION_EXPORT vtkLegendBoxActor : public vtkActor2D
62{
63public:
65 void PrintSelf(ostream& os, vtkIndent indent);
66
72
76 void SetNumberOfEntries(int num);
78 {return this->NumberOfEntries;}
79
81
91 void SetEntry(int i, vtkPolyData *symbol, const char* string, double color[3]);
92 void SetEntry(int i, vtkImageData *symbol, const char* string, double color[3]);
93 void SetEntry(int i, vtkPolyData *symbol, vtkImageData *icon,
94 const char* string, double color[3]);
96
97 void SetEntrySymbol (int i, vtkPolyData *symbol);
98 void SetEntryIcon (int i, vtkImageData *icon);
99 void SetEntryString (int i, const char* string);
100 void SetEntryColor (int i, double color[3]);
101 void SetEntryColor (int i, double r, double g, double b);
102
105 const char* GetEntryString(int i);
106 double* GetEntryColor(int i);
107
109
113 vtkGetObjectMacro(EntryTextProperty,vtkTextProperty);
115
117
121 vtkSetMacro(Border, int);
122 vtkGetMacro(Border, int);
123 vtkBooleanMacro(Border, int);
125
127
135 vtkSetMacro(LockBorder, int);
136 vtkGetMacro(LockBorder, int);
137 vtkBooleanMacro(LockBorder, int);
139
141
146 vtkGetMacro(Box, int);
149
153 vtkProperty2D* GetBoxProperty() { return this->BoxActor->GetProperty(); };
154
156
160 vtkSetClampMacro(Padding, int, 0, 50);
161 vtkGetMacro(Padding, int);
163
165
170 vtkSetMacro(ScalarVisibility,int);
171 vtkGetMacro(ScalarVisibility,int);
172 vtkBooleanMacro(ScalarVisibility,int);
174
176
179 vtkSetMacro(UseBackground, int);
180 vtkGetMacro(UseBackground, int);
181 vtkBooleanMacro(UseBackground, int);
183
185
189 vtkSetVector3Macro(BackgroundColor, double);
190 vtkGetVector3Macro(BackgroundColor, double);
192
194
198 vtkSetClampMacro(BackgroundOpacity, double, 0.0, 1.0);
199 vtkGetMacro(BackgroundOpacity, double);
201
206 void ShallowCopy(vtkProp *prop);
207
216
218
227
232
233protected:
236
238
240
242 int Box;
247
248 // Internal actors, mappers, data to represent the legend
250 int Size; //allocation size
254
260
267
275
276 // Background plane.
279 double BackgroundColor[3];
281
282 // May use texture.
285
286 // Used to control whether the stuff is recomputed
288 int CachedSize[2];
290
291private:
292 vtkLegendBoxActor(const vtkLegendBoxActor&) VTK_DELETE_FUNCTION;
293 void operator=(const vtkLegendBoxActor&) VTK_DELETE_FUNCTION;
294};
295
296
297#endif
298
a actor that draws 2D data
Definition: vtkActor2D.h:46
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
dynamic, self-adjusting array of double
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
draw symbols with text
void ShallowCopy(vtkProp *prop)
Shallow copy of this scaled text actor.
void SetNumberOfEntries(int num)
Specify the number of entries in the legend box.
vtkPolyData * BoxPolyData
vtkTexturedActor2D ** IconActor
vtkTexturedActor2D * BackgroundActor
vtkTimeStamp BuildTime
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
vtkImageData ** IconImage
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
vtkTextProperty * EntryTextProperty
vtkTransformPolyDataFilter ** SymbolTransform
vtkPlaneSource * Background
void SetEntry(int i, vtkImageData *symbol, const char *string, double color[3])
void SetEntry(int i, vtkPolyData *symbol, vtkImageData *icon, const char *string, double color[3])
vtkPlaneSource ** Icon
vtkTransform ** IconTransform
vtkPolyDataMapper2D * BorderMapper
int RenderOpaqueGeometry(vtkViewport *viewport)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
vtkProperty2D * GetBoxProperty()
Get the box vtkProperty2D.
vtkActor2D * BorderActor
vtkPolyData createTexturedPlane()
void SetEntryColor(int i, double color[3])
vtkDoubleArray * Colors
double * GetEntryColor(int i)
vtkImageData * GetEntryIcon(int i)
vtkPolyDataMapper2D * BackgroundMapper
void SetEntrySymbol(int i, vtkPolyData *symbol)
vtkTextMapper ** TextMapper
virtual void SetEntryTextProperty(vtkTextProperty *p)
Set/Get the text property.
void SetEntry(int i, vtkPolyData *symbol, const char *string, double color[3])
Add an entry to the legend box.
void InitializeEntries()
vtkPolyDataMapper2D ** IconMapper
vtkTransformPolyDataFilter ** IconTransformFilter
vtkPolyData * BorderPolyData
vtkTransform ** Transform
void SetEntryColor(int i, double r, double g, double b)
static vtkLegendBoxActor * New()
Instantiate object with a rectangle in normaled view coordinates of (0.2,0.85, 0.8,...
vtkPolyDataMapper2D ** SymbolMapper
vtkPolyDataMapper2D * BoxMapper
vtkPolyData ** Symbol
void SetEntryString(int i, const char *string)
int RenderOverlay(vtkViewport *viewport)
Support the standard render methods.
vtkPolyData * GetEntrySymbol(int i)
vtkActor2D ** SymbolActor
vtkActor2D ** TextActor
virtual int HasTranslucentPolygonalGeometry()
Does this prop have some translucent polygonal geometry?
const char * GetEntryString(int i)
void SetEntryIcon(int i, vtkImageData *icon)
create an array of quadrilaterals located in a plane
draw vtkPolyData onto the image plane
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
represent surface properties of a 2D image
Definition: vtkProperty2D.h:41
2D text annotation
Definition: vtkTextMapper.h:54
represent text properties.
actor that draws 2D data with texture support
record modification and/or execution time
Definition: vtkTimeStamp.h:36
transform points and associated normals and vectors for polygonal dataset
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:61
abstract specification for Viewports
Definition: vtkViewport.h:48
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
@ Box
Definition: vtkX3D.h:65
@ color
Definition: vtkX3D.h:221
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.