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 "vtkLabelRenderStrategy.h" 00027 00028 class vtkActor2D; 00029 class vtkFreeTypeUtilities; 00030 class vtkTextMapper; 00031 00032 class VTK_RENDERING_EXPORT vtkFreeTypeLabelRenderStrategy : public vtkLabelRenderStrategy 00033 { 00034 public: 00035 void PrintSelf(ostream& os, vtkIndent indent); 00036 vtkTypeMacro(vtkFreeTypeLabelRenderStrategy, vtkLabelRenderStrategy); 00037 static vtkFreeTypeLabelRenderStrategy* New(); 00038 00040 00041 virtual bool SupportsRotation() 00042 { return false; } 00044 00046 00048 virtual bool SupportsBoundedSize() 00049 { return false; } 00051 00052 //BTX 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); } 00071 //ETX 00073 00077 virtual void ReleaseGraphicsResources(vtkWindow *window); 00078 00079 protected: 00080 vtkFreeTypeLabelRenderStrategy(); 00081 ~vtkFreeTypeLabelRenderStrategy(); 00082 00083 vtkFreeTypeUtilities* FreeTypeUtilities; 00084 vtkTextMapper* Mapper; 00085 vtkActor2D* Actor; 00086 00087 private: 00088 vtkFreeTypeLabelRenderStrategy(const vtkFreeTypeLabelRenderStrategy&); // Not implemented. 00089 void operator=(const vtkFreeTypeLabelRenderStrategy&); // Not implemented. 00090 }; 00091 00092 #endif 00093