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 "vtkRenderingCoreModule.h" // For export macro
27 #include "vtkObject.h"
28 
29 class vtkStdString;
30 class vtkUnicodeString;
31 class vtkTextProperty;
32 class vtkImageData;
33 class vtkVector2i;
34 
35 class VTKRENDERINGCORE_EXPORT vtkStringToImage : public vtkObject
36 {
37 public:
38  vtkTypeMacro(vtkStringToImage, vtkObject);
39  virtual void PrintSelf(ostream &os, vtkIndent indent);
40 
42 
51  virtual vtkVector2i GetBounds(vtkTextProperty *property,
52  const vtkUnicodeString& string) = 0;
53  virtual vtkVector2i GetBounds(vtkTextProperty *property,
54  const vtkStdString& string) = 0;
56 
58 
60  virtual int RenderString(vtkTextProperty *property,
61  const vtkUnicodeString& string,
62  vtkImageData *data) = 0;
63  virtual int RenderString(vtkTextProperty *property,
64  const vtkStdString& string,
65  vtkImageData *data) = 0;
67 
69 
71  virtual void SetScaleToPowerOfTwo(bool scale);
72  vtkGetMacro(ScaleToPowerOfTwo, bool)
74 
75 protected:
77  ~vtkStringToImage();
78 
79  bool Antialias;
80  bool ScaleToPowerOfTwo;
81 
82 private:
83  vtkStringToImage(const vtkStringToImage &); // Not implemented.
84  void operator=(const vtkStringToImage &); // Not implemented.
85 };
86 
87 #endif //__vtkStringToImage_h