VTK
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkTextRendererStringToImage.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTextRendererStringToImage.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 
21 #ifndef __vtkTextRendererStringToImage_h
22 #define __vtkTextRendererStringToImage_h
23 
24 #include "vtkRenderingFreeTypeModule.h" // For export macro
25 #include "vtkStringToImage.h"
26 
27 class VTKRENDERINGFREETYPE_EXPORT vtkTextRendererStringToImage :
28  public vtkStringToImage
29 {
30 public:
31  vtkTypeMacro(vtkTextRendererStringToImage, vtkStringToImage);
32  virtual void PrintSelf(ostream &os, vtkIndent indent);
33 
34  static vtkTextRendererStringToImage *New();
35 
37 
46  virtual vtkVector2i GetBounds(vtkTextProperty *property,
47  const vtkUnicodeString& string);
48  virtual vtkVector2i GetBounds(vtkTextProperty *property,
49  const vtkStdString& string);
51 
53 
59  virtual int RenderString(vtkTextProperty *property,
60  const vtkUnicodeString& string,
61  vtkImageData *data,
62  int textDims[2] = NULL);
63  virtual int RenderString(vtkTextProperty *property,
64  const vtkStdString& string,
65  vtkImageData *data,
66  int textDims[2] = NULL);
68 
71  virtual void SetScaleToPowerOfTwo(bool scale);
72 
74  void DeepCopy(vtkTextRendererStringToImage *utility);
75 
76 protected:
79 
80  class Internals;
81  Internals* Implementation;
82 
83 private:
85  void operator=(const vtkTextRendererStringToImage &); // Not implemented.
86 };
87 
88 #endif //__vtkTextRendererStringToImage_h
uses vtkTextRenderer to render the supplied text to an image.