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 
24 #ifndef vtkStringToImage_h
25 #define vtkStringToImage_h
26 
27 #include "vtkRenderingCoreModule.h" // For export macro
28 #include "vtkObject.h"
29 
30 class vtkStdString;
31 class vtkUnicodeString;
32 class vtkTextProperty;
33 class vtkImageData;
34 class vtkVector2i;
35 
37 {
38 public:
39  vtkTypeMacro(vtkStringToImage, vtkObject);
40  virtual void PrintSelf(ostream &os, vtkIndent indent);
41 
43 
52  virtual vtkVector2i GetBounds(vtkTextProperty *property,
53  const vtkUnicodeString& string, int dpi) = 0;
54  virtual vtkVector2i GetBounds(vtkTextProperty *property,
55  const vtkStdString& string, int dpi) = 0;
57 
59 
65  virtual int RenderString(vtkTextProperty *property,
66  const vtkUnicodeString& string, int dpi,
68  int textDims[2] = NULL) = 0;
69  virtual int RenderString(vtkTextProperty *property,
70  const vtkStdString& string, int dpi,
72  int text_dims[2] = NULL) = 0;
74 
76 
78  virtual void SetScaleToPowerOfTwo(bool scale);
79  vtkGetMacro(ScaleToPowerOfTwo, bool)
81 
82 protected:
84  ~vtkStringToImage();
85 
86  bool Antialias;
87  bool ScaleToPowerOfTwo;
88 
89 private:
90  vtkStringToImage(const vtkStringToImage &); // Not implemented.
91  void operator=(const vtkStringToImage &); // Not implemented.
92 };
93 
94 #endif //vtkStringToImage_h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
abstract base class for most VTK objects
Definition: vtkObject.h:61
base class for classes that render supplied text to an image.
virtual void PrintSelf(ostream &os, vtkIndent indent)
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.
#define VTKRENDERINGCORE_EXPORT
String class that stores Unicode text.