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 
00052 
00054   virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkStdString label,
00055                                   double bds[4])
00056     { this->Superclass::ComputeLabelBounds(tprop, label, bds); }
00057   virtual void ComputeLabelBounds(vtkTextProperty* tprop, vtkUnicodeString label,
00058                                   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,
00067                            int maxWidth)
00068     { this->Superclass::RenderLabel(x, tprop, label, maxWidth); }
00069   virtual void RenderLabel(int x[2], vtkTextProperty* tprop,
00070                            vtkUnicodeString label);
00071   virtual void RenderLabel(int x[2], vtkTextProperty* tprop,
00072                            vtkUnicodeString label, int maxWidth);
00074 
00076   virtual void StartFrame();
00077 
00079   virtual void EndFrame();
00080 
00084   virtual void ReleaseGraphicsResources(vtkWindow *window);
00085 
00086 protected:
00087   vtkQtLabelRenderStrategy();
00088   ~vtkQtLabelRenderStrategy();
00089 
00090   //BTX
00091   class Internals;
00092   Internals* Implementation;
00093   //ETX
00094 
00095   vtkQImageToImageSource* QImageToImage;
00096   vtkPlaneSource* PlaneSource;
00097   vtkTextureMapToPlane* TextureMapToPlane;
00098   vtkTexture* Texture;
00099   vtkPolyDataMapper2D* Mapper;
00100   vtkTexturedActor2D* Actor;
00101   bool AntialiasText; // Should the text be antialiased, inherited from render window.
00102 
00103 private:
00104   vtkQtLabelRenderStrategy(const vtkQtLabelRenderStrategy&);  // Not implemented.
00105   void operator=(const vtkQtLabelRenderStrategy&);  // Not implemented.
00106 };
00107 
00108 #endif