VTK
vtkStringToImage.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkStringToImage.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 
23 #ifndef __vtkStringToImage_h
24 #define __vtkStringToImage_h
25 
26 #include "vtkObject.h"
27 
28 class vtkStdString;
29 class vtkUnicodeString;
30 class vtkTextProperty;
31 class vtkImageData;
32 class vtkVector2i;
33 
35 {
36 public:
37  vtkTypeMacro(vtkStringToImage, vtkObject);
38  virtual void PrintSelf(ostream &os, vtkIndent indent);
39 
41 
50  virtual vtkVector2i GetBounds(vtkTextProperty *property,
51  const vtkUnicodeString& string) = 0;
52  virtual vtkVector2i GetBounds(vtkTextProperty *property,
53  const vtkStdString& string) = 0;
55 
57 
59  virtual int RenderString(vtkTextProperty *property,
60  const vtkUnicodeString& string,
61  vtkImageData *data) = 0;
62  virtual int RenderString(vtkTextProperty *property,
63  const vtkStdString& string,
64  vtkImageData *data) = 0;
66 
68 
70  virtual void SetScaleToPowerOfTwo(bool scale);
71  vtkGetMacro(ScaleToPowerOfTwo, bool)
73 
74 protected:
76  ~vtkStringToImage();
77 
78  bool Antialias;
79  bool ScaleToPowerOfTwo;
80 
81 private:
82  vtkStringToImage(const vtkStringToImage &); // Not implemented.
83  void operator=(const vtkStringToImage &); // Not implemented.
84 };
85 
86 #endif //__vtkStringToImage_h