VTK  9.3.20240423
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
28#ifndef vtkLabelSizeCalculator_h
29#define vtkLabelSizeCalculator_h
30
32#include "vtkRenderingLabelModule.h" // For export macro
33
34VTK_ABI_NAMESPACE_BEGIN
35class vtkIntArray;
36class vtkTextRenderer;
37class vtkStringArray;
38class vtkTextProperty;
39
40class VTKRENDERINGLABEL_EXPORT vtkLabelSizeCalculator : public vtkPassInputTypeAlgorithm
41{
42public:
44 void PrintSelf(ostream& os, vtkIndent indent) override;
46
48
54 virtual void SetFontProperty(vtkTextProperty* fontProp, int type = 0);
55 virtual vtkTextProperty* GetFontProperty(int type = 0);
57
59
63 vtkSetStringMacro(LabelSizeArrayName);
64 vtkGetStringMacro(LabelSizeArrayName);
66
68
72 vtkSetMacro(DPI, int);
73 vtkGetMacro(DPI, int);
75
76protected:
79
80 int FillInputPortInformation(int port, vtkInformation* info) override;
82 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
83
85
86 virtual void SetFontUtil(vtkTextRenderer* fontProp);
87 vtkGetObjectMacro(FontUtil, vtkTextRenderer);
88
91
92 int DPI;
93
94 class Internals;
95 Internals* Implementation;
96
97private:
99 void operator=(const vtkLabelSizeCalculator&) = delete;
100};
101
102VTK_ABI_NAMESPACE_END
103#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
This filter takes an input dataset, an array to process (which must be a string array),...
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()
Superclass for algorithms that produce output of the same type as input.
a vtkAbstractArray subclass for strings
represent text properties.
Interface for generating images and path data from string data, using multiple backends.