VTK  9.2.6
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 "vtkSmartPointer.h" // For SP ivars
32 #include "vtkStringToImage.h"
33 
35 
36 class VTKRENDERINGQT_EXPORT vtkQtStringToImage : public vtkStringToImage
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
45 
58  vtkVector2i GetBounds(vtkTextProperty* property, const vtkStdString& string, int dpi) override;
60 
62 
67  int RenderString(vtkTextProperty* property, const vtkStdString& string, int dpi,
68  vtkImageData* data, int textDims[2] = nullptr) override;
70 
74  void DeepCopy(vtkQtStringToImage* utility);
75 
76 protected:
78  ~vtkQtStringToImage() override;
79 
80  class Internals;
81  Internals* Implementation;
82 
84 
85 private:
86  vtkQtStringToImage(const vtkQtStringToImage&) = delete;
87  void operator=(const vtkQtStringToImage&) = delete;
88 };
89 
90 #endif // vtkQtStringToImage_h
topologically and geometrically regular array of data
Definition: vtkImageData.h:163
a simple class to control print indentation
Definition: vtkIndent.h:119
Create image data from a QImage.
uses Qt to render the supplied text to an image.
vtkSmartPointer< vtkQImageToImageSource > QImageToImage
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void DeepCopy(vtkQtStringToImage *utility)
Make a deep copy of the supplied utility class.
Internals * Implementation
vtkVector2i GetBounds(vtkTextProperty *property, const vtkStdString &string, int dpi) override
Given a text property and a string, get the bounding box [xmin, xmax] x [ymin, ymax].
static vtkQtStringToImage * New()
~vtkQtStringToImage() override
int RenderString(vtkTextProperty *property, const vtkStdString &string, int dpi, vtkImageData *data, int textDims[2]=nullptr) override
Given a text property and a string, this function initializes the vtkImageData *data and renders it i...
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:108
base class for classes that render supplied text to an image.
represent text properties.
Some derived classes for the different vectors commonly used.
Definition: vtkVector.h:481
@ data
Definition: vtkX3D.h:321