VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkFreeTypeLabelRenderStrategy.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 =========================================================================*/ 00023 #ifndef vtkFreeTypeLabelRenderStrategy_h 00024 #define vtkFreeTypeLabelRenderStrategy_h 00025 00026 #include "vtkRenderingLabelModule.h" // For export macro 00027 #include "vtkLabelRenderStrategy.h" 00028 00029 class vtkActor2D; 00030 class vtkFreeTypeUtilities; 00031 class vtkTextMapper; 00032 00033 class VTKRENDERINGLABEL_EXPORT vtkFreeTypeLabelRenderStrategy : public vtkLabelRenderStrategy 00034 { 00035 public: 00036 void PrintSelf(ostream& os, vtkIndent indent); 00037 vtkTypeMacro(vtkFreeTypeLabelRenderStrategy, vtkLabelRenderStrategy); 00038 static vtkFreeTypeLabelRenderStrategy* New(); 00039 00041 00042 virtual bool SupportsRotation() 00043 { return false; } 00045 00047 00049 virtual bool SupportsBoundedSize() 00050 { return false; } 00052 00054 00056 virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkStdString label, double bds[4]) 00057 { this->Superclass::ComputeLabelBounds(tprop, label, bds); } 00058 virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkUnicodeString label, double bds[4]); 00060 00062 00064 virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label) 00065 { this->Superclass::RenderLabel(x, tprop, label); } 00066 virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label, int width) 00067 { this->Superclass::RenderLabel(x, tprop, label, width); } 00068 virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkUnicodeString label); 00069 virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkUnicodeString label, int width) 00070 { this->Superclass::RenderLabel(x, tprop, label, width); } 00072 00076 virtual void ReleaseGraphicsResources(vtkWindow *window); 00077 00078 protected: 00079 vtkFreeTypeLabelRenderStrategy(); 00080 ~vtkFreeTypeLabelRenderStrategy(); 00081 00082 vtkFreeTypeUtilities* FreeTypeUtilities; 00083 vtkTextMapper* Mapper; 00084 vtkActor2D* Actor; 00085 00086 private: 00087 vtkFreeTypeLabelRenderStrategy(const vtkFreeTypeLabelRenderStrategy&); // Not implemented. 00088 void operator=(const vtkFreeTypeLabelRenderStrategy&); // Not implemented. 00089 }; 00090 00091 #endif 00092