VTK  9.4.20250102
vtkQtStringToImage.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
15#ifndef vtkQtStringToImage_h
16#define vtkQtStringToImage_h
17
18#include "vtkRenderingQtModule.h" // For export macro
19#include "vtkSmartPointer.h" // For SP ivars
20#include "vtkStringToImage.h"
21
22VTK_ABI_NAMESPACE_BEGIN
24
25class VTKRENDERINGQT_EXPORT vtkQtStringToImage : public vtkStringToImage
26{
27public:
29 void PrintSelf(ostream& os, vtkIndent indent) override;
30
32
34
47 vtkVector2i GetBounds(vtkTextProperty* property, const vtkStdString& string, int dpi) override;
49
51
56 int RenderString(vtkTextProperty* property, const vtkStdString& string, int dpi,
57 vtkImageData* data, int textDims[2] = nullptr) override;
59
64
65protected:
68
69 class Internals;
70 Internals* Implementation;
71
73
74private:
76 void operator=(const vtkQtStringToImage&) = delete;
77};
78
79VTK_ABI_NAMESPACE_END
80#endif // vtkQtStringToImage_h
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
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.
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.
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:440