VTK  9.7.1
vtkTextActor3D.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
24 #ifndef vtkTextActor3D_h
25 #define vtkTextActor3D_h
26 
27 #include "vtkProp3D.h"
28 #include "vtkRenderingCoreModule.h" // For export macro
29 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
30 #include <string> // for ivar
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkImageActor;
34 class vtkImageData;
35 class vtkTextProperty;
36 
37 class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkTextActor3D : public vtkProp3D
38 {
39 public:
40  static vtkTextActor3D* New();
41  vtkTypeMacro(vtkTextActor3D, vtkProp3D);
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
48  vtkSetStringMacro(Input);
49  vtkGetStringMacro(Input);
51 
53 
56  virtual void SetTextProperty(vtkTextProperty* p);
57  vtkGetObjectMacro(TextProperty, vtkTextProperty);
59 
66  static int GetRenderedDPI() { return 72; }
67 
72  void ShallowCopy(vtkProp* prop) override;
73 
77  double* GetBounds() VTK_SIZEHINT(6) override;
78  void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds(bounds); }
79 
85  int GetBoundingBox(int bbox[4]);
86 
94  void ReleaseGraphicsResources(vtkWindow*) override;
95 
100  virtual void SetForceOpaque(bool opaque);
101  virtual bool GetForceOpaque();
102  virtual void ForceOpaqueOn();
103  virtual void ForceOpaqueOff();
104  virtual void SetForceTranslucent(bool trans);
105  virtual bool GetForceTranslucent();
106  virtual void ForceTranslucentOn();
107  virtual void ForceTranslucentOff();
110 
116  int RenderOpaqueGeometry(vtkViewport* viewport) override;
117  int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override;
118  int RenderOverlay(vtkViewport* viewport) override;
120 
125 
126 protected:
127  vtkTextActor3D();
128  ~vtkTextActor3D() override;
129 
130  char* Input;
131 
135 
138 
139  virtual int UpdateImageActor();
140 
141 private:
142  vtkTextActor3D(const vtkTextActor3D&) = delete;
143  void operator=(const vtkTextActor3D&) = delete;
144 };
145 
146 VTK_ABI_NAMESPACE_END
147 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
vtkImageActor * ImageActor
void GetBounds(T a, double bds[6])
vtkTimeStamp BuildTime
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
abstract specification for Viewports
Definition: vtkViewport.h:46
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:236
virtual vtkTypeBool HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:300
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:239
record modification and/or execution time
Definition: vtkTimeStamp.h:24
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:39
std::string LastInputString
int vtkTypeBool
Definition: vtkABI.h:64
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:321
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:38
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkImageData * ImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkProp3D.
static int GetRenderedDPI()
Since a 3D text actor is not pixel-aligned and positioned in 3D space, the text is rendered at a cons...
An actor that displays text.
#define VTK_SIZEHINT(...)
represent text properties.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:237
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkTextProperty * TextProperty