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 
26 #ifndef vtkQtStringToImage_h
27 #define vtkQtStringToImage_h
28 
29 #include "vtkRenderingQtModule.h" // For export macro
30 #include "vtkStringToImage.h"
31 #include "vtkSmartPointer.h" // For SP ivars
32 
34 
35 class VTKRENDERINGQT_EXPORT vtkQtStringToImage : public vtkStringToImage
36 {
37 public:
39  virtual void PrintSelf(ostream &os, vtkIndent indent);
40 
41  static vtkQtStringToImage *New();
42 
44 
53  virtual vtkVector2i GetBounds(vtkTextProperty *property,
54  const vtkUnicodeString& string, int dpi);
55  virtual vtkVector2i GetBounds(vtkTextProperty *property,
56  const vtkStdString& string, int dpi);
58 
60 
64  virtual int RenderString(vtkTextProperty *property,
65  const vtkUnicodeString& string, int dpi,
67  int textDims[2] = NULL);
68  virtual int RenderString(vtkTextProperty *property,
69  const vtkStdString& string, int dpi,
71  int textDims[2] = NULL);
73 
75  void DeepCopy(vtkQtStringToImage *utility);
76 
77 protected:
80 
81  class Internals;
82  Internals* Implementation;
83 
85 
86 private:
87  vtkQtStringToImage(const vtkQtStringToImage &); // Not implemented.
88  void operator=(const vtkQtStringToImage &); // Not implemented.
89 };
90 
91 #endif //vtkQtStringToImage_h
Create image data from a QImage.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
vtkSmartPointer< vtkQImageToImageSource > QImageToImage
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
uses Qt to render the 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
Internals * Implementation
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
represent text properties.
virtual vtkVector2i GetBounds(vtkTextProperty *property, const vtkUnicodeString &string, int dpi)=0
static vtkObject * New()
String class that stores Unicode text.
virtual void PrintSelf(ostream &os, vtkIndent indent)