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 
39 #ifndef vtkLabelSizeCalculator_h
40 #define vtkLabelSizeCalculator_h
41 
42 #include "vtkRenderingLabelModule.h" // For export macro
44 
45 class vtkIntArray;
46 class vtkTextRenderer;
47 class vtkStringArray;
48 class vtkTextProperty;
49 
51 {
52 public:
53  static vtkLabelSizeCalculator* New();
54  virtual void PrintSelf( ostream& os, vtkIndent indent );
56 
58 
62  virtual void SetFontProperty(vtkTextProperty* fontProp, int type = 0);
63  virtual vtkTextProperty* GetFontProperty(int type = 0);
65 
67 
69  vtkSetStringMacro(LabelSizeArrayName);
70  vtkGetStringMacro(LabelSizeArrayName);
72 
74 
76  vtkSetMacro(DPI, int)
77  vtkGetMacro(DPI, int)
79 
80 protected:
82  virtual ~vtkLabelSizeCalculator();
83 
84  virtual int FillInputPortInformation( int port, vtkInformation* info );
85  virtual int RequestData(
86  vtkInformation* request,
87  vtkInformationVector** inInfo,
88  vtkInformationVector* outInfo );
89 
90  virtual vtkIntArray* LabelSizesForArray( vtkAbstractArray* labels, vtkIntArray* types );
91 
92  virtual void SetFontUtil( vtkTextRenderer* fontProp );
93  vtkGetObjectMacro(FontUtil,vtkTextRenderer);
94 
95  vtkTextRenderer* FontUtil;
96  char* LabelSizeArrayName;
97 
98  int DPI;
99 
100  //BTX
101  class Internals;
102  Internals* Implementation;
103  //ETX
104 
105 private:
106  vtkLabelSizeCalculator( const vtkLabelSizeCalculator& ); // Not implemented.
107  void operator = ( const vtkLabelSizeCalculator& ); // Not implemented.
108 };
109 
110 #endif // vtkLabelSizeCalculator_h
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
a vtkAbstractArray subclass for strings
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:49
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKRENDERINGLABEL_EXPORT
represent text properties.
void PrintSelf(ostream &os, vtkIndent indent)
Interface for generating images and path data from string data, using multiple backends.
Store zero or more vtkInformation instances.
static vtkPassInputTypeAlgorithm * New()