VTK  9.3.20240328
vtkFreeTypeLabelRenderStrategy.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
12 #ifndef vtkFreeTypeLabelRenderStrategy_h
13 #define vtkFreeTypeLabelRenderStrategy_h
14 
15 #include "vtkLabelRenderStrategy.h"
16 #include "vtkRenderingLabelModule.h" // For export macro
17 
18 VTK_ABI_NAMESPACE_BEGIN
19 class vtkActor2D;
20 class vtkTextRenderer;
21 class vtkTextMapper;
22 
23 class VTKRENDERINGLABEL_EXPORT vtkFreeTypeLabelRenderStrategy : public vtkLabelRenderStrategy
24 {
25 public:
26  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
33  bool SupportsRotation() override { return false; }
34 
38  bool SupportsBoundedSize() override { return false; }
39 
43  void ComputeLabelBounds(vtkTextProperty* tprop, vtkStdString label, double bds[4]) override;
44 
49  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label) override;
50 
56  void ReleaseGraphicsResources(vtkWindow* window) override;
57 
58 protected:
61 
65 
66 private:
68  void operator=(const vtkFreeTypeLabelRenderStrategy&) = delete;
69 };
70 
71 VTK_ABI_NAMESPACE_END
72 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:144
bool SupportsBoundedSize() override
The free type render strategy currently does not support bounded size labels.
bool SupportsRotation() override
The free type render strategy currently does not support rotation.
void ReleaseGraphicsResources(vtkWindow *window) override
Release any graphics resources that are being consumed by this strategy.
~vtkFreeTypeLabelRenderStrategy() override
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label) override
Render a label at a location in world coordinates.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkFreeTypeLabelRenderStrategy * New()
void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4]) override
Compute the bounds of a label.
a simple class to control print indentation
Definition: vtkIndent.h:108
Superclass for label rendering implementations.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:78
2D text annotation
represent text properties.
Interface for generating images and path data from string data, using multiple backends.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:47