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
28#include "vtkRenderingLabelModule.h" // For export macro
29
30class vtkActor2D;
31class vtkTextRenderer;
32class vtkTextMapper;
33
34class VTKRENDERINGLABEL_EXPORT vtkFreeTypeLabelRenderStrategy : public vtkLabelRenderStrategy
35{
36public:
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
82protected:
85
89
90private:
92 void operator=(const vtkFreeTypeLabelRenderStrategy&) = delete;
93};
94
95#endif
a actor that draws 2D data
Definition: vtkActor2D.h:149
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
static vtkFreeTypeLabelRenderStrategy * New()
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
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:113
Superclass for label rendering implementations.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:105
2D text annotation
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