VTK  9.1.0
vtkFreeTypeLabelRenderStrategy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkFreeTypeLabelRenderStrategy.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
24 #ifndef vtkFreeTypeLabelRenderStrategy_h
25 #define vtkFreeTypeLabelRenderStrategy_h
26 
27 #include "vtkLabelRenderStrategy.h"
28 #include "vtkRenderingLabelModule.h" // For export macro
29 
30 class vtkActor2D;
31 class vtkTextRenderer;
32 class vtkTextMapper;
33 
34 class VTKRENDERINGLABEL_EXPORT vtkFreeTypeLabelRenderStrategy : public vtkLabelRenderStrategy
35 {
36 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
44  bool SupportsRotation() override { return false; }
45 
49  bool SupportsBoundedSize() override { return false; }
50 
54  void ComputeLabelBounds(vtkTextProperty* tprop, vtkStdString label, double bds[4]) override
55  {
56  this->Superclass::ComputeLabelBounds(tprop, label, bds);
57  }
58  void ComputeLabelBounds(vtkTextProperty* tprop, vtkUnicodeString label, double bds[4]) override;
59 
64  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label) override
65  {
66  this->Superclass::RenderLabel(x, tprop, label);
67  }
68  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label, int width) override
69  {
70  this->Superclass::RenderLabel(x, tprop, label, width);
71  }
72  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkUnicodeString label) override;
73  using Superclass::RenderLabel;
74 
80  void ReleaseGraphicsResources(vtkWindow* window) override;
81 
82 protected:
85 
89 
90 private:
92  void operator=(const vtkFreeTypeLabelRenderStrategy&) = delete;
93 };
94 
95 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:40
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 RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label, int width) override
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkUnicodeString label) override
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.
void ComputeLabelBounds(vtkTextProperty *tprop, vtkUnicodeString label, double bds[4]) override
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:34
Superclass for label rendering implementations.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:36
2D text annotation
Definition: vtkTextMapper.h:48
represent text properties.
Interface for generating images and path data from string data, using multiple backends.
String class that stores Unicode text.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39