VTK
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 
37 #ifndef vtkLabelSizeCalculator_h
38 #define vtkLabelSizeCalculator_h
39 
41 #include "vtkRenderingLabelModule.h" // For export macro
42 
43 class vtkIntArray;
44 class vtkTextRenderer;
45 class vtkStringArray;
46 class vtkTextProperty;
47 
48 class VTKRENDERINGLABEL_EXPORT vtkLabelSizeCalculator : public vtkPassInputTypeAlgorithm
49 {
50 public:
51  static vtkLabelSizeCalculator* New();
52  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56 
62  virtual void SetFontProperty(vtkTextProperty* fontProp, int type = 0);
63  virtual vtkTextProperty* GetFontProperty(int type = 0);
65 
67 
71  vtkSetStringMacro(LabelSizeArrayName);
72  vtkGetStringMacro(LabelSizeArrayName);
74 
76 
80  vtkSetMacro(DPI, int);
81  vtkGetMacro(DPI, int);
83 
84 protected:
86  ~vtkLabelSizeCalculator() override;
87 
89  int RequestData(
90  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
91 
92  virtual vtkIntArray* LabelSizesForArray(vtkAbstractArray* labels, vtkIntArray* types);
93 
94  virtual void SetFontUtil(vtkTextRenderer* fontProp);
95  vtkGetObjectMacro(FontUtil, vtkTextRenderer);
96 
99 
100  int DPI;
101 
102  class Internals;
103  Internals* Implementation;
104 
105 private:
107  void operator=(const vtkLabelSizeCalculator&) = delete;
108 };
109 
110 #endif // vtkLabelSizeCalculator_h
vtkPassInputTypeAlgorithm.h
vtkLabelSizeCalculator::Implementation
Internals * Implementation
Definition: vtkLabelSizeCalculator.h:102
vtkX3D::type
Definition: vtkX3D.h:522
vtkLabelSizeCalculator::LabelSizeArrayName
char * LabelSizeArrayName
Definition: vtkLabelSizeCalculator.h:98
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPassInputTypeAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkX3D::port
Definition: vtkX3D.h:453
vtkLabelSizeCalculator
Definition: vtkLabelSizeCalculator.h:48
vtkPassInputTypeAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
Definition: vtkPassInputTypeAlgorithm.h:171
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:39
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:75
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:33
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:64
vtkX3D::info
Definition: vtkX3D.h:382
vtkTextRenderer
Interface for generating images and path data from string data, using multiple backends.
Definition: vtkTextRenderer.h:73
vtkLabelSizeCalculator::FontUtil
vtkTextRenderer * FontUtil
Definition: vtkLabelSizeCalculator.h:95
vtkPassInputTypeAlgorithm::New
static vtkPassInputTypeAlgorithm * New()
vtkPassInputTypeAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:36
vtkLabelSizeCalculator::DPI
int DPI
Definition: vtkLabelSizeCalculator.h:100
vtkPassInputTypeAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkPassInputTypeAlgorithm.h:51