VTK  9.7.20260928
vtkTextRendererStringToImage.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
9
10#ifndef vtkTextRendererStringToImage_h
11#define vtkTextRendererStringToImage_h
12
13#include "vtkRenderingFreeTypeModule.h" // For export macro
14#include "vtkStringToImage.h"
15#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
16
17VTK_ABI_NAMESPACE_BEGIN
18class VTKRENDERINGFREETYPE_EXPORT VTK_MARSHALAUTO vtkTextRendererStringToImage
19 : public vtkStringToImage
20{
21public:
23 void PrintSelf(ostream& os, vtkIndent indent) override;
24
26
28
41 vtkVector2i GetBounds(vtkTextProperty* property, const vtkStdString& string, int dpi) override;
43
45
52 int RenderString(vtkTextProperty* property, const vtkStdString& string, int dpi,
53 vtkImageData* data, int textDims[2] = nullptr) override;
55
60 void SetScaleToPowerOfTwo(bool scale) override;
61
66
67protected:
70
71 class Internals;
72 Internals* Implementation;
73
74private:
76 void operator=(const vtkTextRendererStringToImage&) = delete;
77};
78
79VTK_ABI_NAMESPACE_END
80#endif // vtkTextRendererStringToImage_h
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Wrapper around std::string to keep symbols short.
represent text properties.
static vtkTextRendererStringToImage * New()
void DeepCopy(vtkTextRendererStringToImage *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].
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetScaleToPowerOfTwo(bool scale) override
Should we produce images at powers of 2, makes rendering on old OpenGL hardware easier.
~vtkTextRendererStringToImage() 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...
Some derived classes for the different vectors commonly used.
Definition vtkVector.h:450
#define VTK_MARSHALAUTO