VTK  9.2.6
vtkLabelSizeCalculator.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkLabelSizeCalculator.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15
40#ifndef vtkLabelSizeCalculator_h
41#define vtkLabelSizeCalculator_h
42
44#include "vtkRenderingLabelModule.h" // For export macro
45
46class vtkIntArray;
47class vtkTextRenderer;
48class vtkStringArray;
49class vtkTextProperty;
50
51class VTKRENDERINGLABEL_EXPORT vtkLabelSizeCalculator : public vtkPassInputTypeAlgorithm
52{
53public:
55 void PrintSelf(ostream& os, vtkIndent indent) override;
57
59
65 virtual void SetFontProperty(vtkTextProperty* fontProp, int type = 0);
66 virtual vtkTextProperty* GetFontProperty(int type = 0);
68
70
74 vtkSetStringMacro(LabelSizeArrayName);
75 vtkGetStringMacro(LabelSizeArrayName);
77
79
83 vtkSetMacro(DPI, int);
84 vtkGetMacro(DPI, int);
86
87protected:
90
91 int FillInputPortInformation(int port, vtkInformation* info) override;
93 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
94
96
97 virtual void SetFontUtil(vtkTextRenderer* fontProp);
98 vtkGetObjectMacro(FontUtil, vtkTextRenderer);
99
102
103 int DPI;
104
105 class Internals;
106 Internals* Implementation;
107
108private:
110 void operator=(const vtkLabelSizeCalculator&) = delete;
111};
112
113#endif // vtkLabelSizeCalculator_h
Abstract superclass for all arrays.
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:46
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.