VTK
vtkFreeTypeStringToImage.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkFreeTypeStringToImage.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 =========================================================================*/
15 
26 #ifndef vtkFreeTypeStringToImage_h
27 #define vtkFreeTypeStringToImage_h
28 
29 #include "vtkRenderingFreeTypeModule.h" // For export macro
30 #include "vtkStringToImage.h"
31 #include "vtkSmartPointer.h" // For SP ivars
32 
34 {
35 public:
37  virtual void PrintSelf(ostream &os, vtkIndent indent);
38 
39  static vtkFreeTypeStringToImage *New();
40 
42 
51  virtual vtkVector2i GetBounds(vtkTextProperty *property,
52  const vtkUnicodeString& string, int dpi);
53  virtual vtkVector2i GetBounds(vtkTextProperty *property,
54  const vtkStdString& string, int dpi);
56 
58 
64  virtual int RenderString(vtkTextProperty *property,
65  const vtkUnicodeString& string, int dpi,
67  int textDims[2] = NULL);
68  virtual int RenderString(vtkTextProperty *property,
69  const vtkStdString& string, int dpi,
71  int textDims[2] = NULL);
73 
76  virtual void SetScaleToPowerOfTwo(bool scale);
77 
79  void DeepCopy(vtkFreeTypeStringToImage *utility);
80 
81 protected:
84 
85  class Internals;
86  Internals* Implementation;
87 
88 private:
89  vtkFreeTypeStringToImage(const vtkFreeTypeStringToImage &); // Not implemented.
90  void operator=(const vtkFreeTypeStringToImage &); // Not implemented.
91 };
92 
93 #endif //vtkFreeTypeStringToImage_h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
uses Qt to render the supplied text to an image.
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
#define VTKRENDERINGFREETYPE_EXPORT
base class for classes that render supplied text to an image.
virtual int RenderString(vtkTextProperty *property, const vtkUnicodeString &string, int dpi, vtkImageData *data, int textDims[2]=NULL)=0
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
represent text properties.
virtual vtkVector2i GetBounds(vtkTextProperty *property, const vtkUnicodeString &string, int dpi)=0
virtual void SetScaleToPowerOfTwo(bool scale)
static vtkObject * New()
String class that stores Unicode text.
virtual void PrintSelf(ostream &os, vtkIndent indent)