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 
27 #ifndef vtkFreeTypeStringToImage_h
28 #define vtkFreeTypeStringToImage_h
29 
30 #include "vtkRenderingFreeTypeModule.h" // For export macro
31 #include "vtkStringToImage.h"
32 #include "vtkSmartPointer.h" // For SP ivars
33 
34 class VTKRENDERINGFREETYPE_EXPORT vtkFreeTypeStringToImage : public vtkStringToImage
35 {
36 public:
38  virtual void PrintSelf(ostream &os, vtkIndent indent);
39 
41 
43 
57  const vtkUnicodeString& string, int dpi);
59  const vtkStdString& string, int dpi);
61 
63 
70  virtual int RenderString(vtkTextProperty *property,
71  const vtkUnicodeString& string, int dpi,
73  int textDims[2] = NULL);
74  virtual int RenderString(vtkTextProperty *property,
75  const vtkStdString& string, int dpi,
77  int textDims[2] = NULL);
79 
84  virtual void SetScaleToPowerOfTwo(bool scale);
85 
90 
91 protected:
94 
95  class Internals;
96  Internals* Implementation;
97 
98 private:
99  vtkFreeTypeStringToImage(const vtkFreeTypeStringToImage &) VTK_DELETE_FUNCTION;
100  void operator=(const vtkFreeTypeStringToImage &) VTK_DELETE_FUNCTION;
101 };
102 
103 #endif //vtkFreeTypeStringToImage_h
vtkFreeTypeStringToImage::New
static vtkFreeTypeStringToImage * New()
vtkFreeTypeStringToImage::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkFreeTypeStringToImage::RenderString
virtual int RenderString(vtkTextProperty *property, const vtkUnicodeString &string, int dpi, vtkImageData *data, int textDims[2]=NULL)
Given a text property and a string, this function initializes the vtkImageData *data and renders it i...
vtkX3D::scale
@ scale
Definition: vtkX3D.h:229
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkStringToImage
base class for classes that render supplied text to an image.
Definition: vtkStringToImage.h:38
vtkFreeTypeStringToImage::~vtkFreeTypeStringToImage
~vtkFreeTypeStringToImage()
vtkFreeTypeStringToImage::Implementation
Internals * Implementation
Definition: vtkFreeTypeStringToImage.h:95
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkUnicodeString
String class that stores Unicode text.
Definition: vtkUnicodeString.h:73
vtkSmartPointer.h
vtkFreeTypeStringToImage::GetBounds
virtual vtkVector2i GetBounds(vtkTextProperty *property, const vtkStdString &string, int dpi)
vtkFreeTypeStringToImage::GetBounds
virtual vtkVector2i GetBounds(vtkTextProperty *property, const vtkUnicodeString &string, int dpi)
Given a text property and a string, get the bounding box [xmin, xmax] x [ymin, ymax].
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:40
vtkStringToImage.h
vtkFreeTypeStringToImage::vtkFreeTypeStringToImage
vtkFreeTypeStringToImage()
vtkFreeTypeStringToImage::RenderString
virtual int RenderString(vtkTextProperty *property, const vtkStdString &string, int dpi, vtkImageData *data, int textDims[2]=NULL)
vtkVector2i
Some derived classes for the different vectors commonly used.
Definition: vtkVector.h:328
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:49
vtkFreeTypeStringToImage::DeepCopy
void DeepCopy(vtkFreeTypeStringToImage *utility)
Make a deep copy of the supplied utility class.
vtkFreeTypeStringToImage
uses Qt to render the supplied text to an image.
Definition: vtkFreeTypeStringToImage.h:35
vtkFreeTypeStringToImage::SetScaleToPowerOfTwo
virtual void SetScaleToPowerOfTwo(bool scale)
Should we produce images at powers of 2, makes rendering on old OpenGL hardware easier.