VTK
dox/Rendering/vtkLabelSizeCalculator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkLabelSizeCalculator.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 
00039 #ifndef __vtkLabelSizeCalculator_h
00040 #define __vtkLabelSizeCalculator_h
00041 
00042 #include "vtkPassInputTypeAlgorithm.h"
00043 
00044 class vtkIntArray;
00045 class vtkFreeTypeUtilities;
00046 class vtkStringArray;
00047 class vtkTextProperty;
00048 
00049 class VTK_RENDERING_EXPORT vtkLabelSizeCalculator : public vtkPassInputTypeAlgorithm
00050 {
00051 public:
00052   static vtkLabelSizeCalculator* New();
00053   virtual void PrintSelf( ostream& os, vtkIndent indent );
00054   vtkTypeMacro(vtkLabelSizeCalculator,vtkPassInputTypeAlgorithm);
00055 
00057 
00061   virtual void SetFontProperty(vtkTextProperty* fontProp, int type = 0);
00062   virtual vtkTextProperty* GetFontProperty(int type = 0);
00064 
00066 
00068   vtkSetStringMacro(LabelSizeArrayName);
00069   vtkGetStringMacro(LabelSizeArrayName);
00071 
00072 protected:
00073   vtkLabelSizeCalculator();
00074   virtual ~vtkLabelSizeCalculator();
00075 
00076   virtual int FillInputPortInformation( int port, vtkInformation* info );
00077   virtual int RequestData(
00078     vtkInformation* request,
00079     vtkInformationVector** inInfo,
00080     vtkInformationVector* outInfo );
00081 
00082   virtual vtkIntArray* LabelSizesForArray( vtkAbstractArray* labels, vtkIntArray* types );
00083 
00084   virtual void SetFontUtil( vtkFreeTypeUtilities* fontProp );
00085   vtkGetObjectMacro(FontUtil,vtkFreeTypeUtilities);
00086 
00087   vtkFreeTypeUtilities* FontUtil;
00088   char* LabelSizeArrayName;
00089 
00090   //BTX
00091   class Internals;
00092   Internals* Implementation;
00093   //ETX
00094 
00095 private:
00096   vtkLabelSizeCalculator( const vtkLabelSizeCalculator& ); // Not implemented.
00097   void operator = ( const vtkLabelSizeCalculator& ); // Not implemented.
00098 };
00099 
00100 #endif // __vtkLabelSizeCalculator_h