VTK
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 "vtkRenderingLabelModule.h" // For export macro
28 #include "vtkLabelRenderStrategy.h"
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) VTK_OVERRIDE;
40 
44  bool SupportsRotation() VTK_OVERRIDE
45  { return false; }
46 
50  bool SupportsBoundedSize() VTK_OVERRIDE
51  { return false; }
52 
56  void ComputeLabelBounds(vtkTextProperty* tprop, vtkStdString label, double bds[4]) VTK_OVERRIDE
57  { this->Superclass::ComputeLabelBounds(tprop, label, bds); }
58  void ComputeLabelBounds(vtkTextProperty* tprop, vtkUnicodeString label, double bds[4]) VTK_OVERRIDE;
59 
64  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label) VTK_OVERRIDE
65  { this->Superclass::RenderLabel(x, tprop, label); }
66  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label, int width) VTK_OVERRIDE
67  { this->Superclass::RenderLabel(x, tprop, label, width); }
68  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkUnicodeString label) VTK_OVERRIDE;
69  void RenderLabel(int x[2], vtkTextProperty* tprop, vtkUnicodeString label, int width) VTK_OVERRIDE
70  { this->Superclass::RenderLabel(x, tprop, label, width); }
71 
77  void ReleaseGraphicsResources(vtkWindow *window) VTK_OVERRIDE;
78 
79 protected:
81  ~vtkFreeTypeLabelRenderStrategy() VTK_OVERRIDE;
82 
86 
87 private:
89  void operator=(const vtkFreeTypeLabelRenderStrategy&) VTK_DELETE_FUNCTION;
90 };
91 
92 #endif
93 
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:40
Superclass for label rendering implementations.
a actor that draws 2D data
Definition: vtkActor2D.h:45
2D text annotation
Definition: vtkTextMapper.h:53
virtual void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4])
Compute the bounds of a label.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label) override
Render a label at a location in world coordinates.
bool SupportsBoundedSize() override
The free type render strategy currently does not support bounded size labels.
a simple class to control print indentation
Definition: vtkIndent.h:39
void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4]) override
Compute the bounds of a label.
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this strategy.
represent text properties.
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkUnicodeString label, int width) override
Interface for generating images and path data from string data, using multiple backends.
bool SupportsRotation() override
The free type render strategy currently does not support rotation.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label, int width) override
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label)
Render a label at a location in display coordinates.
String class that stores Unicode text.