VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkQtLabelRenderStrategy.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 =========================================================================*/ 00030 #ifndef __vtkQtLabelRenderStrategy_h 00031 #define __vtkQtLabelRenderStrategy_h 00032 00033 #include "vtkRenderingQtModule.h" // For export macro 00034 #include "vtkLabelRenderStrategy.h" 00035 00036 class vtkLabelSizeCalculator; 00037 class vtkLabeledDataMapper; 00038 class vtkPlaneSource; 00039 class vtkPolyDataMapper2D; 00040 class vtkQImageToImageSource; 00041 class vtkTexture; 00042 class vtkTexturedActor2D; 00043 class vtkTextureMapToPlane; 00044 00045 class VTKRENDERINGQT_EXPORT vtkQtLabelRenderStrategy : public vtkLabelRenderStrategy 00046 { 00047 public: 00048 void PrintSelf(ostream& os, vtkIndent indent); 00049 vtkTypeMacro(vtkQtLabelRenderStrategy, vtkLabelRenderStrategy); 00050 static vtkQtLabelRenderStrategy* New(); 00051 00053 00055 virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkStdString label, 00056 double bds[4]) 00057 { this->Superclass::ComputeLabelBounds(tprop, label, bds); } 00058 virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkUnicodeString label, 00059 double bds[4]); 00061 00063 00065 virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label) 00066 { this->Superclass::RenderLabel(x, tprop, label); } 00067 virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label, 00068 int maxWidth) 00069 { this->Superclass::RenderLabel(x, tprop, label, maxWidth); } 00070 virtual void RenderLabel(int x[2], vtkTextProperty* tprop, 00071 vtkUnicodeString label); 00072 virtual void RenderLabel(int x[2], vtkTextProperty* tprop, 00073 vtkUnicodeString label, int maxWidth); 00075 00077 virtual void StartFrame(); 00078 00080 virtual void EndFrame(); 00081 00085 virtual void ReleaseGraphicsResources(vtkWindow *window); 00086 00087 protected: 00088 vtkQtLabelRenderStrategy(); 00089 ~vtkQtLabelRenderStrategy(); 00090 00091 //BTX 00092 class Internals; 00093 Internals* Implementation; 00094 //ETX 00095 00096 vtkQImageToImageSource* QImageToImage; 00097 vtkPlaneSource* PlaneSource; 00098 vtkTextureMapToPlane* TextureMapToPlane; 00099 vtkTexture* Texture; 00100 vtkPolyDataMapper2D* Mapper; 00101 vtkTexturedActor2D* Actor; 00102 bool AntialiasText; // Should the text be antialiased, inherited from render window. 00103 00104 private: 00105 vtkQtLabelRenderStrategy(const vtkQtLabelRenderStrategy&); // Not implemented. 00106 void operator=(const vtkQtLabelRenderStrategy&); // Not implemented. 00107 }; 00108 00109 #endif