VTK  9.7.20260724
vtkLabelSizeCalculator.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
24
25#ifndef vtkLabelSizeCalculator_h
26#define vtkLabelSizeCalculator_h
27
29#include "vtkRenderingLabelModule.h" // For export macro
30
31VTK_ABI_NAMESPACE_BEGIN
32class vtkIntArray;
33class vtkTextRenderer;
34class vtkStringArray;
35class vtkTextProperty;
36
37class VTKRENDERINGLABEL_EXPORT vtkLabelSizeCalculator : public vtkPassInputTypeAlgorithm
38{
39public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
43
45
51 virtual void SetFontProperty(vtkTextProperty* fontProp, int type = 0);
52 virtual vtkTextProperty* GetFontProperty(int type = 0);
54
56
60 vtkSetStringMacro(LabelSizeArrayName);
61 vtkGetStringMacro(LabelSizeArrayName);
63
65
69 vtkSetMacro(DPI, int);
70 vtkGetMacro(DPI, int);
72
73protected:
76
77 int FillInputPortInformation(int port, vtkInformation* info) override;
79 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
80
82
83 virtual void SetFontUtil(vtkTextRenderer* fontProp);
84 vtkGetObjectMacro(FontUtil, vtkTextRenderer);
85
88
89 int DPI;
90
91 class Internals;
92 Internals* Implementation;
93
94private:
96 void operator=(const vtkLabelSizeCalculator&) = delete;
97};
98
99VTK_ABI_NAMESPACE_END
100#endif // vtkLabelSizeCalculator_h
Abstract superclass for all arrays.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
virtual vtkIntArray * LabelSizesForArray(vtkAbstractArray *labels, vtkIntArray *types)
~vtkLabelSizeCalculator() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
virtual void SetFontProperty(vtkTextProperty *fontProp, int type=0)
Get/Set the font used compute label sizes.
virtual vtkTextProperty * GetFontProperty(int type=0)
Get/Set the font used compute label sizes.
virtual void SetFontUtil(vtkTextRenderer *fontProp)
static vtkLabelSizeCalculator * New()
a vtkAbstractArray subclass for strings
represent text properties.
Interface for generating images and path data from string data, using multiple backends.