VTK
|
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 "vtkRenderingLabelModule.h" // For export macro 00043 #include "vtkPassInputTypeAlgorithm.h" 00044 00045 class vtkIntArray; 00046 class vtkFreeTypeUtilities; 00047 class vtkStringArray; 00048 class vtkTextProperty; 00049 00050 class VTKRENDERINGLABEL_EXPORT vtkLabelSizeCalculator : public vtkPassInputTypeAlgorithm 00051 { 00052 public: 00053 static vtkLabelSizeCalculator* New(); 00054 virtual void PrintSelf( ostream& os, vtkIndent indent ); 00055 vtkTypeMacro(vtkLabelSizeCalculator,vtkPassInputTypeAlgorithm); 00056 00058 00062 virtual void SetFontProperty(vtkTextProperty* fontProp, int type = 0); 00063 virtual vtkTextProperty* GetFontProperty(int type = 0); 00065 00067 00069 vtkSetStringMacro(LabelSizeArrayName); 00070 vtkGetStringMacro(LabelSizeArrayName); 00072 00073 protected: 00074 vtkLabelSizeCalculator(); 00075 virtual ~vtkLabelSizeCalculator(); 00076 00077 virtual int FillInputPortInformation( int port, vtkInformation* info ); 00078 virtual int RequestData( 00079 vtkInformation* request, 00080 vtkInformationVector** inInfo, 00081 vtkInformationVector* outInfo ); 00082 00083 virtual vtkIntArray* LabelSizesForArray( vtkAbstractArray* labels, vtkIntArray* types ); 00084 00085 virtual void SetFontUtil( vtkFreeTypeUtilities* fontProp ); 00086 vtkGetObjectMacro(FontUtil,vtkFreeTypeUtilities); 00087 00088 vtkFreeTypeUtilities* FontUtil; 00089 char* LabelSizeArrayName; 00090 00091 //BTX 00092 class Internals; 00093 Internals* Implementation; 00094 //ETX 00095 00096 private: 00097 vtkLabelSizeCalculator( const vtkLabelSizeCalculator& ); // Not implemented. 00098 void operator = ( const vtkLabelSizeCalculator& ); // Not implemented. 00099 }; 00100 00101 #endif // __vtkLabelSizeCalculator_h