VTK  9.3.1
vtkStringToImage.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 
13 #ifndef vtkStringToImage_h
14 #define vtkStringToImage_h
15 
16 #include "vtkObject.h"
17 #include "vtkRenderingCoreModule.h" // For export macro
18 
19 VTK_ABI_NAMESPACE_BEGIN
20 class vtkStdString;
21 class vtkTextProperty;
22 class vtkImageData;
23 class vtkVector2i;
24 
25 class VTKRENDERINGCORE_EXPORT vtkStringToImage : public vtkObject
26 {
27 public:
28  vtkTypeMacro(vtkStringToImage, vtkObject);
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
32 
45  virtual vtkVector2i GetBounds(vtkTextProperty* property, const vtkStdString& string, int dpi) = 0;
47 
49 
56  virtual int RenderString(vtkTextProperty* property, const vtkStdString& string, int dpi,
57  vtkImageData* data, int text_dims[2] = nullptr) = 0;
59 
64  virtual void SetScaleToPowerOfTwo(bool scale);
65  vtkGetMacro(ScaleToPowerOfTwo, bool);
66 
67 protected:
69  ~vtkStringToImage() override;
70 
71  bool Antialias;
73 
74 private:
75  vtkStringToImage(const vtkStringToImage&) = delete;
76  void operator=(const vtkStringToImage&) = delete;
77 };
78 
79 VTK_ABI_NAMESPACE_END
80 #endif // vtkStringToImage_h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:28
void GetBounds(T a, double bds[6])
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
base class for classes that render supplied text to an image.
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
Some derived classes for the different vectors commonly used.
Definition: vtkVector.h:440
represent text properties.