VTK  9.5.20250723
vtkFollowerTextPropertyAdaptor.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3#ifndef vtkFollowerTextPropertyAdaptor_h
4#define vtkFollowerTextPropertyAdaptor_h
5
7#include "vtkNew.h"
8
9VTK_ABI_NAMESPACE_BEGIN
10
11class vtkAxisFollower;
12class vtkProperty;
14class vtkTextProperty;
15
26{
27public:
30
36 static void OnModified(vtkObject*, unsigned long, void* clientData, void*);
37
45 void UpdateProperty(vtkTextProperty* textProp, vtkProperty* actorProperty);
46
53 void SetScale(double scale);
54
60 [[nodiscard]] double GetFontScale();
61
62private:
63 vtkAxisFollower* MapperFollower;
64 vtkProp3DAxisFollower* PropFollower;
65 double FontScale = 1;
66
67 unsigned int TextPropObserverId = 0;
68 vtkNew<vtkCallbackCommand> ModifiedCallback;
69};
70
71VTK_ABI_NAMESPACE_END
72#endif
a subclass of vtkFollower that ensures that data is always parallel to the axis defined by a vtkAxisA...
vtkFollowerTextPropertyAdaptor is a helper class to mimic vtkTextProperty behavior for a vtkAxisFollo...
void SetScale(double scale)
Update the scale, taking the FontScale into account.
double GetFontScale()
Return the scale to apply to mimic a font size.
vtkFollowerTextPropertyAdaptor(vtkAxisFollower *follower, vtkProp3DAxisFollower *propFollower)
static void OnModified(vtkObject *, unsigned long, void *clientData, void *)
Call Modified on the vtkAxisActor of the follower, to trigger a render.
void UpdateProperty(vtkTextProperty *textProp, vtkProperty *actorProperty)
DeepCopy actorProperty.
Allocate and hold a VTK object.
Definition vtkNew.h:167
abstract base class for most VTK objects
Definition vtkObject.h:162
a subclass of vtkProp3DFollower that ensures that data is always parallel to the axis defined by a vt...
represent surface properties of a geometric object
represent text properties.