VTK  9.7.20260922
vtkTextOverlayRepresentation.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
46
47#ifndef vtkTextOverlayRepresentation_h
48#define vtkTextOverlayRepresentation_h
49
50#include "vtkNew.h" // For ivar
52#include "vtkViewsScivisModule.h" // For export macro
53
54VTK_ABI_NAMESPACE_BEGIN
55class vtkTextActor;
56class vtkTextProperty;
57
58class VTKVIEWSSCIVIS_EXPORT vtkTextOverlayRepresentation : public vtkScivisRepresentation
59{
60public:
63 void PrintSelf(ostream& os, vtkIndent indent) override;
64
66
69 void SetVisibility(bool val) override;
70 bool GetVisibility() override;
72
74
77 void SetText(const char* text);
78 const char* GetText();
80
82
87 void SetPosition(int x, int y);
90
96
103
104protected:
107
108 bool AddToView(vtkScivisView* view) override;
109 bool RemoveFromView(vtkScivisView* view) override;
110
111private:
113 void operator=(const vtkTextOverlayRepresentation&) = delete;
114
115 vtkNew<vtkTextActor> TextActor;
116};
117
118VTK_ABI_NAMESPACE_END
119#endif
a simple class to control print indentation
Definition vtkIndent.h:108
Allocate and hold a VTK object.
Definition vtkNew.h:168
An actor that displays text.
void SetText(const char *text)
The string to draw.
void SetVisibility(bool val) override
Whether the text is drawn.
const char * GetText()
The string to draw.
vtkTextActor * GetTextActor()
The actor the text is drawn by, for what neither this representation nor the text property covers – a...
static vtkTextOverlayRepresentation * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool AddToView(vtkScivisView *view) override
Called when this representation is added to or removed from a view.
bool RemoveFromView(vtkScivisView *view) override
Called when this representation is added to or removed from a view.
bool GetVisibility() override
Whether the text is drawn.
double * GetPosition()
Where the text sits, in pixels from the lower left corner of the render window.
vtkTextProperty * GetTextProperty()
How the text is drawn: its font and size, color and opacity, bold and italic, and its justification a...
void SetPosition(int x, int y)
Where the text sits, in pixels from the lower left corner of the render window.
represent text properties.
#define VTK_SIZEHINT(...)