VTK
vtkQtStringToImage.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtStringToImage.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 vtkQtStringToImage_h
28 #define vtkQtStringToImage_h
29 
30 #include "vtkRenderingQtModule.h" // For export macro
31 #include "vtkStringToImage.h"
32 #include "vtkSmartPointer.h" // For SP ivars
33 
35 
36 class VTKRENDERINGQT_EXPORT vtkQtStringToImage : public vtkStringToImage
37 {
38 public:
40  virtual void PrintSelf(ostream &os, vtkIndent indent);
41 
42  static vtkQtStringToImage *New();
43 
45 
58  virtual vtkVector2i GetBounds(vtkTextProperty *property,
59  const vtkUnicodeString& string, int dpi);
60  virtual vtkVector2i GetBounds(vtkTextProperty *property,
61  const vtkStdString& string, int dpi);
63 
65 
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 
83  void DeepCopy(vtkQtStringToImage *utility);
84 
85 protected:
88 
89  class Internals;
90  Internals* Implementation;
91 
93 
94 private:
95  vtkQtStringToImage(const vtkQtStringToImage &) VTK_DELETE_FUNCTION;
96  void operator=(const vtkQtStringToImage &) VTK_DELETE_FUNCTION;
97 };
98 
99 #endif //vtkQtStringToImage_h
Create image data from a QImage.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:47
vtkSmartPointer< vtkQImageToImageSource > QImageToImage
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
base class for classes that render supplied text to an image.
uses Qt to render the supplied text to an image.
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...
Internals * Implementation
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
Some derived classes for the different vectors commonly used.
Definition: vtkVector.h:327
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].
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.
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.