VTK  9.7.1
vtkDynamic2DLabelMapper.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
46 #ifndef vtkDynamic2DLabelMapper_h
47 #define vtkDynamic2DLabelMapper_h
48 
49 #include "vtkLabeledDataMapper.h"
50 #include "vtkRenderingLabelModule.h" // For export macro
51 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
52 
53 VTK_ABI_NAMESPACE_BEGIN
54 class VTKRENDERINGLABEL_EXPORT VTK_MARSHALAUTO vtkDynamic2DLabelMapper : public vtkLabeledDataMapper
55 {
56 public:
58 
62  static vtkDynamic2DLabelMapper* New();
64  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
71  void SetPriorityArrayName(const char* name);
72 
74 
78  vtkSetMacro(ReversePriority, bool);
79  vtkGetMacro(ReversePriority, bool);
80  vtkBooleanMacro(ReversePriority, bool);
82 
84 
89  vtkSetMacro(LabelHeightPadding, float);
90  vtkGetMacro(LabelHeightPadding, float);
92 
94 
99  vtkSetMacro(LabelWidthPadding, float);
100  vtkGetMacro(LabelWidthPadding, float);
102 
104 
107  void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor) override;
108  void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor) override;
110 
111 protected:
113  ~vtkDynamic2DLabelMapper() override;
114 
118  double GetCurrentScale(vtkViewport* viewport);
119 
120  void BuildLabelsInternal(vtkDataSet* input) override;
121 
122  float* LabelWidth;
123  float* LabelHeight;
124  float* Cutoff;
128 
130 
131 private:
133  void operator=(const vtkDynamic2DLabelMapper&) = delete;
134 
135  struct vtkDynamic2DLabelMapperFormatter;
136 };
137 
138 VTK_ABI_NAMESPACE_END
139 #endif
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:46
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
a actor that draws 2D data
Definition: vtkActor2D.h:35
draw text labels at 2D dataset points
draw text labels at dataset points
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual void BuildLabelsInternal(vtkDataSet *)
void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor) override
Draw the text to the screen at each input point.
#define VTK_MARSHALAUTO
void RenderOpaqueGeometry(vtkViewport *viewport, vtkActor2D *actor) override
Draw the text to the screen at each input point.