VTK: Rendering/Label/vtkLabelSizeCalculator.h Source File

| VTK 9.3.1

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
31 #include "vtkPassInputTypeAlgorithm.h"
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:
43 static vtkLabelSizeCalculator* New();
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45 vtkTypeMacro(vtkLabelSizeCalculator, vtkPassInputTypeAlgorithm);
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
76 protected:
77 vtkLabelSizeCalculator();
78 ~vtkLabelSizeCalculator() override;
79
80 int FillInputPortInformation(int port, vtkInformation* info) override;
81 int RequestData(
82 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
83
84 virtual vtkIntArray* LabelSizesForArray(vtkAbstractArray* labels, vtkIntArray* types);
85
86 virtual void SetFontUtil(vtkTextRenderer* fontProp);
87 vtkGetObjectMacro(FontUtil, vtkTextRenderer);
88
89 vtkTextRenderer* FontUtil;
90 char* LabelSizeArrayName;
91
92 int DPI;
93
94 class Internals;
95 Internals* Implementation;
96
97 private:
98 vtkLabelSizeCalculator(const vtkLabelSizeCalculator&) = delete;
99 void operator=(const vtkLabelSizeCalculator&) = delete;
100 };
101
102 VTK_ABI_NAMESPACE_END
103 #endif // vtkLabelSizeCalculator_h
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:44
vtkLabelSizeCalculator
This filter takes an input dataset, an array to process (which must be a string array),...
Definition: vtkLabelSizeCalculator.h:41
vtkLabelSizeCalculator::Implementation
Internals * Implementation
Definition: vtkLabelSizeCalculator.h:94
vtkLabelSizeCalculator::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkLabelSizeCalculator::~vtkLabelSizeCalculator
~vtkLabelSizeCalculator() override
vtkLabelSizeCalculator::New
static vtkLabelSizeCalculator * New()
vtkLabelSizeCalculator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkLabelSizeCalculator::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkLabelSizeCalculator::SetFontProperty
virtual void SetFontProperty(vtkTextProperty *fontProp, int type=0)
Get/Set the font used compute label sizes.
vtkLabelSizeCalculator::DPI
int DPI
Definition: vtkLabelSizeCalculator.h:92
vtkLabelSizeCalculator::vtkLabelSizeCalculator
vtkLabelSizeCalculator()
vtkLabelSizeCalculator::GetFontProperty
virtual vtkTextProperty * GetFontProperty(int type=0)
Get/Set the font used compute label sizes.
vtkLabelSizeCalculator::FontUtil
vtkTextRenderer * FontUtil
Definition: vtkLabelSizeCalculator.h:87
vtkLabelSizeCalculator::LabelSizesForArray
virtual vtkIntArray * LabelSizesForArray(vtkAbstractArray *labels, vtkIntArray *types)
vtkLabelSizeCalculator::LabelSizeArrayName
char * LabelSizeArrayName
Definition: vtkLabelSizeCalculator.h:90
vtkLabelSizeCalculator::SetFontUtil
virtual void SetFontUtil(vtkTextRenderer *fontProp)
vtkPassInputTypeAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkPassInputTypeAlgorithm.h:45
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:41
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:35
vtkTextRenderer
Interface for generating images and path data from string data, using multiple backends.
Definition: vtkTextRenderer.h:71
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkX3D::type
@ type
Definition: vtkX3D.h:516
vtkPassInputTypeAlgorithm.h