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
23
24#ifndef vtkQtStringToImage_h
25#define vtkQtStringToImage_h
26
27#include "vtkRenderingQtModule.h" // For export macro
28#include "vtkSmartPointer.h" // For SP ivars
29#include "vtkStringToImage.h"
30
32
33class VTKRENDERINGQT_EXPORT vtkQtStringToImage : public vtkStringToImage
34{
35public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
40
42
55 vtkVector2i GetBounds(vtkTextProperty* property, const vtkStdString& string, int dpi) override;
57
59
64 int RenderString(vtkTextProperty* property, const vtkStdString& string, int dpi,
65 vtkImageData* data, int textDims[2] = nullptr) override;
67
72
73protected:
76
77 class Internals;
78 Internals* Implementation;
79
81
82private:
84 void operator=(const vtkQtStringToImage&) = delete;
85};
86
87#endif // vtkQtStringToImage_h
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:34
Create image data from a QImage.
vtkSmartPointer< vtkQImageToImageSource > QImageToImage
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkQtStringToImage * New()
void DeepCopy(vtkQtStringToImage *utility)
Make a deep copy of the supplied utility class.
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].
~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...
Hold a reference to a vtkObjectBase instance.
Wrapper around std::string to keep symbols short.
represent text properties.
Some derived classes for the different vectors commonly used.
Definition vtkVector.h:419