VTK
dox/Rendering/vtkQtLabelRenderStrategy.h
Go to the documentation of this file.
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 "vtkLabelRenderStrategy.h"
00034 
00035 class vtkLabelSizeCalculator;
00036 class vtkLabeledDataMapper;
00037 class vtkPlaneSource;
00038 class vtkPolyDataMapper2D;
00039 class vtkQImageToImageSource;
00040 class vtkTexture;
00041 class vtkTexturedActor2D;
00042 class vtkTextureMapToPlane;
00043 
00044 class VTK_RENDERING_EXPORT vtkQtLabelRenderStrategy : public vtkLabelRenderStrategy
00045 {
00046  public:
00047   void PrintSelf(ostream& os, vtkIndent indent);
00048   vtkTypeMacro(vtkQtLabelRenderStrategy, vtkLabelRenderStrategy);
00049   static vtkQtLabelRenderStrategy* New();
00050 
00051   //BTX
00053 
00055   virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkStdString label, double bds[4])
00056     { this->Superclass::ComputeLabelBounds(tprop, label, bds); }
00057   virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkUnicodeString label, double bds[4]);
00059 
00061 
00063   virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label)
00064     { this->Superclass::RenderLabel(x, tprop, label); }
00065   virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkStdString label, int maxWidth)
00066     { this->Superclass::RenderLabel(x, tprop, label, maxWidth); }
00067   virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkUnicodeString label);
00068   virtual void RenderLabel(int x[2], vtkTextProperty* tprop, vtkUnicodeString label, int maxWidth);
00069   //ETX
00071 
00073   virtual void StartFrame();
00074 
00076   virtual void EndFrame();
00077 
00081   virtual void ReleaseGraphicsResources(vtkWindow *window);
00082 
00083 protected:
00084   vtkQtLabelRenderStrategy();
00085   ~vtkQtLabelRenderStrategy();
00086 
00087   //BTX
00088   class Internals;
00089   Internals* Implementation;
00090   //ETX
00091 
00092   vtkQImageToImageSource* QImageToImage;
00093   vtkPlaneSource* PlaneSource;
00094   vtkTextureMapToPlane* TextureMapToPlane;
00095   vtkTexture* Texture;
00096   vtkPolyDataMapper2D* Mapper;
00097   vtkTexturedActor2D* Actor;
00098   bool AntialiasText; // Should the text be antialiased, inherited from render window.
00099 
00100 private:
00101   vtkQtLabelRenderStrategy(const vtkQtLabelRenderStrategy&);  // Not implemented.
00102   void operator=(const vtkQtLabelRenderStrategy&);  // Not implemented.
00103 };
00104 
00105 #endif
00106