VTK
vtkFreeTypeStringToImage.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkFreeTypeStringToImage.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 vtkFreeTypeStringToImage_h
25 #define vtkFreeTypeStringToImage_h
26 
27 #include "vtkRenderingFreeTypeModule.h" // For export macro
28 #include "vtkStringToImage.h"
29 #include "vtkSmartPointer.h" // For SP ivars
30 
31 class VTKRENDERINGFREETYPE_EXPORT vtkFreeTypeStringToImage : public vtkStringToImage
32 {
33 public:
35  void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE;
36 
37  static vtkFreeTypeStringToImage *New();
38 
40 
54  const vtkUnicodeString& string, int dpi) VTK_OVERRIDE;
56  const vtkStdString& string, int dpi) VTK_OVERRIDE;
58 
60 
67  int RenderString(vtkTextProperty *property,
68  const vtkUnicodeString& string, int dpi,
70  int textDims[2] = NULL) VTK_OVERRIDE;
71  int RenderString(vtkTextProperty *property,
72  const vtkStdString& string, int dpi,
74  int textDims[2] = NULL) VTK_OVERRIDE;
76 
81  void SetScaleToPowerOfTwo(bool scale) VTK_OVERRIDE;
82 
86  void DeepCopy(vtkFreeTypeStringToImage *utility);
87 
88 protected:
90  ~vtkFreeTypeStringToImage() VTK_OVERRIDE;
91 
92  class Internals;
93  Internals* Implementation;
94 
95 private:
96  vtkFreeTypeStringToImage(const vtkFreeTypeStringToImage &) VTK_DELETE_FUNCTION;
97  void operator=(const vtkFreeTypeStringToImage &) VTK_DELETE_FUNCTION;
98 };
99 
100 #endif //vtkFreeTypeStringToImage_h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:41
uses Qt to render the supplied text to an image.
base class for classes that render supplied text to an image.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RenderString(vtkTextProperty *property, const vtkUnicodeString &string, int dpi, vtkImageData *data, int textDims[2]=NULL)=0
Given a text property and a string, this function initializes the vtkImageData *data and renders it i...
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
Some derived classes for the different vectors commonly used.
Definition: vtkVector.h:324
represent text properties.
virtual vtkVector2i GetBounds(vtkTextProperty *property, const vtkUnicodeString &string, int dpi)=0
Given a text property and a string, get the bounding box [xmin, xmax] x [ymin, ymax].
virtual void SetScaleToPowerOfTwo(bool scale)
Should we produce images at powers of 2, makes rendering on old OpenGL hardware easier.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
String class that stores Unicode text.