VTK  9.7.20260928
vtkFreeTypeStringToImage.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
12
13#ifndef vtkFreeTypeStringToImage_h
14#define vtkFreeTypeStringToImage_h
15
16#include "vtkRenderingFreeTypeModule.h" // For export macro
17#include "vtkSmartPointer.h" // For SP ivars
18#include "vtkStringToImage.h"
19#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
20
21VTK_ABI_NAMESPACE_BEGIN
22class VTKRENDERINGFREETYPE_EXPORT VTK_MARSHALAUTO vtkFreeTypeStringToImage : public vtkStringToImage
23{
24public:
26 void PrintSelf(ostream& os, vtkIndent indent) override;
27
29
31
44 vtkVector2i GetBounds(vtkTextProperty* property, const vtkStdString& string, int dpi) override;
46
48
55 int RenderString(vtkTextProperty* property, const vtkStdString& string, int dpi,
56 vtkImageData* data, int textDims[2] = nullptr) override;
58
63 void SetScaleToPowerOfTwo(bool scale) override;
64
69
70protected:
73
74 class Internals;
75 Internals* Implementation;
76
77private:
79 void operator=(const vtkFreeTypeStringToImage&) = delete;
80};
81
82VTK_ABI_NAMESPACE_END
83#endif // vtkFreeTypeStringToImage_h
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 vtkFreeTypeStringToImage * New()
void SetScaleToPowerOfTwo(bool scale) override
Should we produce images at powers of 2, makes rendering on old OpenGL hardware easier.
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...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkFreeTypeStringToImage() override
void DeepCopy(vtkFreeTypeStringToImage *utility)
Make a deep copy of the supplied utility class.
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.
Some derived classes for the different vectors commonly used.
Definition vtkVector.h:450
#define VTK_MARSHALAUTO