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 
22 #ifndef vtkTextRendererStringToImage_h
23 #define vtkTextRendererStringToImage_h
24 
25 #include "vtkRenderingFreeTypeModule.h" // For export macro
26 #include "vtkStringToImage.h"
27 
28 class VTKRENDERINGFREETYPE_EXPORT vtkTextRendererStringToImage :
29  public vtkStringToImage
30 {
31 public:
33  virtual void PrintSelf(ostream &os, vtkIndent indent);
34 
36 
38 
52  const vtkUnicodeString& string,
53  int dpi);
55  const vtkStdString& string,
56  int dpi);
58 
60 
67  virtual int RenderString(vtkTextProperty *property,
68  const vtkUnicodeString& string,
69  int dpi,
71  int textDims[2] = NULL);
72  virtual int RenderString(vtkTextProperty *property,
73  const vtkStdString& string,
74  int dpi,
76  int textDims[2] = NULL);
78 
83  virtual void SetScaleToPowerOfTwo(bool scale);
84 
89 
90 protected:
93 
94  class Internals;
95  Internals* Implementation;
96 
97 private:
99  void operator=(const vtkTextRendererStringToImage &) VTK_DELETE_FUNCTION;
100 };
101 
102 #endif //vtkTextRendererStringToImage_h
vtkX3D::scale
@ scale
Definition: vtkX3D.h:229
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkTextRendererStringToImage::SetScaleToPowerOfTwo
virtual void SetScaleToPowerOfTwo(bool scale)
Should we produce images at powers of 2, makes rendering on old OpenGL hardware easier.
vtkStringToImage
base class for classes that render supplied text to an image.
Definition: vtkStringToImage.h:38
vtkTextRendererStringToImage::vtkTextRendererStringToImage
vtkTextRendererStringToImage()
vtkTextRendererStringToImage::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].
vtkTextRendererStringToImage::~vtkTextRendererStringToImage
~vtkTextRendererStringToImage()
vtkTextRendererStringToImage::DeepCopy
void DeepCopy(vtkTextRendererStringToImage *utility)
Make a deep copy of the supplied utility class.
vtkTextRendererStringToImage::Implementation
Internals * Implementation
Definition: vtkTextRendererStringToImage.h:94
vtkTextRendererStringToImage::RenderString
virtual int RenderString(vtkTextProperty *property, const vtkStdString &string, int dpi, vtkImageData *data, int textDims[2]=NULL)
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
vtkTextRendererStringToImage::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...
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:40
vtkStringToImage.h
vtkTextRendererStringToImage::New
static vtkTextRendererStringToImage * New()
vtkTextRendererStringToImage::GetBounds
virtual vtkVector2i GetBounds(vtkTextProperty *property, const vtkStdString &string, int dpi)
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
vtkTextRendererStringToImage
uses vtkTextRenderer to render the supplied text to an image.
Definition: vtkTextRendererStringToImage.h:30
vtkTextRendererStringToImage::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.