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);
40 
44  virtual bool SupportsRotation()
45  { return false; }
46 
50  virtual bool SupportsBoundedSize()
51  { return false; }
52 
56  virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkStdString label, double bds[4])
57  { this->Superclass::ComputeLabelBounds(tprop, label, bds); }
58  virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkUnicodeString label, double bds[4]);
59 
64  virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label)
65  { this->Superclass::RenderLabel(x, tprop, label); }
66  virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label, int width)
67  { this->Superclass::RenderLabel(x, tprop, label, width); }
68  virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkUnicodeString label);
69  virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkUnicodeString label, int width)
70  { this->Superclass::RenderLabel(x, tprop, label, width); }
71 
77  virtual void ReleaseGraphicsResources(vtkWindow *window);
78 
79 protected:
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:47
virtual void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label, int width)
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
virtual bool SupportsBoundedSize()
The free type render strategy currently does not support bounded size labels.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this strategy.
virtual void ComputeLabelBounds(vtkTextProperty *tprop, vtkStdString label, double bds[4])
Compute the bounds of a label.
virtual void RenderLabel(int x[2], vtkTextProperty *tprop, vtkUnicodeString label, int width)
virtual bool SupportsRotation()
The free type render strategy currently does not support rotation.
represent text properties.
Interface for generating images and path data from string data, using multiple backends.
virtual void RenderLabel(int x[2], vtkTextProperty *tprop, vtkStdString label)
Render a label at a location in world coordinates.
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.