VTK: Rendering/Label/vtkDynamic2DLabelMapper.h Source File

| VTK 9.3.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
52 VTK_ABI_NAMESPACE_BEGIN
53 class VTKRENDERINGLABEL_EXPORT vtkDynamic2DLabelMapper : public vtkLabeledDataMapper
54 {
55 public:
57
61 static vtkDynamic2DLabelMapper* New();
62 vtkTypeMacro(vtkDynamic2DLabelMapper, vtkLabeledDataMapper);
63 void PrintSelf(ostream& os, vtkIndent indent) override;
65
70 void SetPriorityArrayName(const char* name);
71
73
77 vtkSetMacro(ReversePriority, bool);
78 vtkGetMacro(ReversePriority, bool);
79 vtkBooleanMacro(ReversePriority, bool);
81
83
88 vtkSetMacro(LabelHeightPadding, float);
89 vtkGetMacro(LabelHeightPadding, float);
91
93
98 vtkSetMacro(LabelWidthPadding, float);
99 vtkGetMacro(LabelWidthPadding, float);
101
103
106 void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor) override;
107 void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor) override;
109
110 protected:
111 vtkDynamic2DLabelMapper();
112 ~vtkDynamic2DLabelMapper() override;
113
117 double GetCurrentScale(vtkViewport* viewport);
118
119 float* LabelWidth;
120 float* LabelHeight;
121 float* Cutoff;
122 float ReferenceScale;
123 float LabelHeightPadding;
124 float LabelWidthPadding;
125
126 bool ReversePriority;
127
128 private:
129 vtkDynamic2DLabelMapper(const vtkDynamic2DLabelMapper&) = delete;
130 void operator=(const vtkDynamic2DLabelMapper&) = delete;
131 };
132
133 VTK_ABI_NAMESPACE_END
134 #endif
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:44
vtkDynamic2DLabelMapper
draw text labels at 2D dataset points
Definition: vtkDynamic2DLabelMapper.h:54
vtkDynamic2DLabelMapper::LabelWidthPadding
float LabelWidthPadding
Definition: vtkDynamic2DLabelMapper.h:124
vtkDynamic2DLabelMapper::LabelHeightPadding
float LabelHeightPadding
Definition: vtkDynamic2DLabelMapper.h:123
vtkDynamic2DLabelMapper::ReversePriority
bool ReversePriority
Definition: vtkDynamic2DLabelMapper.h:126
vtkDynamic2DLabelMapper::New
static vtkDynamic2DLabelMapper * New()
Instantiate object with %%-#6.3g label format.
vtkDynamic2DLabelMapper::~vtkDynamic2DLabelMapper
~vtkDynamic2DLabelMapper() override
vtkDynamic2DLabelMapper::vtkDynamic2DLabelMapper
vtkDynamic2DLabelMapper()
vtkDynamic2DLabelMapper::RenderOverlay
void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor) override
Draw non-overlapping labels to the screen.
vtkDynamic2DLabelMapper::ReferenceScale
float ReferenceScale
Definition: vtkDynamic2DLabelMapper.h:122
vtkDynamic2DLabelMapper::SetPriorityArrayName
void SetPriorityArrayName(const char *name)
Set the points array name to use to give priority to labels.
vtkDynamic2DLabelMapper::GetCurrentScale
double GetCurrentScale(vtkViewport *viewport)
Calculate the current zoom scale of the viewport.
vtkDynamic2DLabelMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Instantiate object with %%-#6.3g label format.
vtkDynamic2DLabelMapper::LabelHeight
float * LabelHeight
Definition: vtkDynamic2DLabelMapper.h:120
vtkDynamic2DLabelMapper::RenderOpaqueGeometry
void RenderOpaqueGeometry(vtkViewport *viewport, vtkActor2D *actor) override
Draw non-overlapping labels to the screen.
vtkDynamic2DLabelMapper::Cutoff
float * Cutoff
Definition: vtkDynamic2DLabelMapper.h:121
vtkDynamic2DLabelMapper::LabelWidth
float * LabelWidth
Definition: vtkDynamic2DLabelMapper.h:119
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkLabeledDataMapper
draw text labels at dataset points
Definition: vtkLabeledDataMapper.h:75
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:54
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkLabeledDataMapper.h