VTK  9.3.20240416
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 
34 VTK_ABI_NAMESPACE_BEGIN
35 class vtkIntArray;
36 class vtkTextRenderer;
37 class vtkStringArray;
38 class vtkTextProperty;
39 
40 class VTKRENDERINGLABEL_EXPORT vtkLabelSizeCalculator : public vtkPassInputTypeAlgorithm
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
48 
54  virtual void SetFontProperty(vtkTextProperty* fontProp, int type = 0);
57 
59 
63  vtkSetStringMacro(LabelSizeArrayName);
64  vtkGetStringMacro(LabelSizeArrayName);
66 
68 
72  vtkSetMacro(DPI, int);
73  vtkGetMacro(DPI, int);
75 
76 protected:
79 
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 
97 private:
99  void operator=(const vtkLabelSizeCalculator&) = delete;
100 };
101 
102 VTK_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
Definition: vtkIntArray.h:144
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.
~vtkLabelSizeCalculator() override
static vtkLabelSizeCalculator * New()
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 vtkIntArray * LabelSizesForArray(vtkAbstractArray *labels, vtkIntArray *types)
virtual void SetFontUtil(vtkTextRenderer *fontProp)
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.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
@ type
Definition: vtkX3D.h:516