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 
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, int dpi) = 0;
53  virtual vtkVector2i GetBounds(vtkTextProperty *property,
54  const vtkStdString& string, int dpi) = 0;
56 
58 
64  virtual int RenderString(vtkTextProperty *property,
65  const vtkUnicodeString& string, int dpi,
67  int textDims[2] = NULL) = 0;
68  virtual int RenderString(vtkTextProperty *property,
69  const vtkStdString& string, int dpi,
71  int text_dims[2] = NULL) = 0;
73 
75 
77  virtual void SetScaleToPowerOfTwo(bool scale);
78  vtkGetMacro(ScaleToPowerOfTwo, bool)
80 
81 protected:
83  ~vtkStringToImage();
84 
85  bool Antialias;
86  bool ScaleToPowerOfTwo;
87 
88 private:
89  vtkStringToImage(const vtkStringToImage &); // Not implemented.
90  void operator=(const vtkStringToImage &); // Not implemented.
91 };
92 
93 #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
uses Qt to render the 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.