VTK
vtkDynamic2DLabelMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDynamic2DLabelMapper.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 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
53 #ifndef vtkDynamic2DLabelMapper_h
54 #define vtkDynamic2DLabelMapper_h
55 
56 #include "vtkRenderingLabelModule.h" // For export macro
57 #include "vtkLabeledDataMapper.h"
58 
59 class VTKRENDERINGLABEL_EXPORT vtkDynamic2DLabelMapper : public vtkLabeledDataMapper
60 {
61 public:
63 
67  static vtkDynamic2DLabelMapper *New();
69  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
71 
76  void SetPriorityArrayName(const char* name);
77 
79 
83  vtkSetMacro(ReversePriority, bool);
84  vtkGetMacro(ReversePriority, bool);
85  vtkBooleanMacro(ReversePriority, bool);
87 
89 
94  vtkSetMacro(LabelHeightPadding, float);
95  vtkGetMacro(LabelHeightPadding, float);
97 
99 
104  vtkSetMacro(LabelWidthPadding, float);
105  vtkGetMacro(LabelWidthPadding, float);
107 
109 
112  void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor) VTK_OVERRIDE;
113  void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor) VTK_OVERRIDE;
115 
116 protected:
118  ~vtkDynamic2DLabelMapper() VTK_OVERRIDE;
119 
123  double GetCurrentScale(vtkViewport *viewport);
124 
125  float* LabelWidth;
126  float* LabelHeight;
127  float* Cutoff;
128  float ReferenceScale;
129  float LabelHeightPadding;
130  float LabelWidthPadding;
131 
132  bool ReversePriority;
133 
134 private:
135  vtkDynamic2DLabelMapper(const vtkDynamic2DLabelMapper&) VTK_DELETE_FUNCTION;
136  void operator=(const vtkDynamic2DLabelMapper&) VTK_DELETE_FUNCTION;
137 };
138 
139 #endif
140 
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkLabeledDataMapper * New()
Instantiate object with %%-#6.3g label format.
abstract specification for Viewports
Definition: vtkViewport.h:44
a actor that draws 2D data
Definition: vtkActor2D.h:39
draw text labels at 2D dataset points
draw text labels at dataset points
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor) override
Draw the text to the screen at each input point.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void RenderOpaqueGeometry(vtkViewport *viewport, vtkActor2D *actor) override
Draw the text to the screen at each input point.