VTK
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 
28  public vtkStringToImage
29 {
30 public:
32  virtual void PrintSelf(ostream &os, vtkIndent indent);
33 
35 
37 
46  virtual vtkVector2i GetBounds(vtkTextProperty *property,
47  const vtkUnicodeString& string,
48  int dpi);
49  virtual vtkVector2i GetBounds(vtkTextProperty *property,
50  const vtkStdString& string,
51  int dpi);
53 
55 
61  virtual int RenderString(vtkTextProperty *property,
62  const vtkUnicodeString& string,
63  int dpi,
65  int textDims[2] = NULL);
66  virtual int RenderString(vtkTextProperty *property,
67  const vtkStdString& string,
68  int dpi,
70  int textDims[2] = NULL);
72 
75  virtual void SetScaleToPowerOfTwo(bool scale);
76 
79 
80 protected:
83 
84  class Internals;
85  Internals* Implementation;
86 
87 private:
89  void operator=(const vtkTextRendererStringToImage &); // Not implemented.
90 };
91 
92 #endif //vtkTextRendererStringToImage_h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
#define VTKRENDERINGFREETYPE_EXPORT
base class for classes that render supplied text to an image.
virtual int RenderString(vtkTextProperty *property, const vtkUnicodeString &string, int dpi, vtkImageData *data, int textDims[2]=NULL)=0
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
uses vtkTextRenderer to render the supplied text to an image.
represent text properties.
virtual vtkVector2i GetBounds(vtkTextProperty *property, const vtkUnicodeString &string, int dpi)=0
virtual void SetScaleToPowerOfTwo(bool scale)
static vtkObject * New()
String class that stores Unicode text.
virtual void PrintSelf(ostream &os, vtkIndent indent)