VTK
dox/Rendering/Qt/vtkQtStringToImage.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkQtStringToImage.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 =========================================================================*/
00015 
00026 #ifndef __vtkQtStringToImage_h
00027 #define __vtkQtStringToImage_h
00028 
00029 #include "vtkRenderingQtModule.h" // For export macro
00030 #include "vtkStringToImage.h"
00031 #include "vtkSmartPointer.h" // For SP ivars
00032 
00033 class vtkQImageToImageSource;
00034 
00035 class VTKRENDERINGQT_EXPORT vtkQtStringToImage : public vtkStringToImage
00036 {
00037 public:
00038   vtkTypeMacro(vtkQtStringToImage, vtkStringToImage);
00039   virtual void PrintSelf(ostream &os, vtkIndent indent);
00040 
00041   static vtkQtStringToImage *New();
00042 
00044 
00053   virtual vtkVector2i GetBounds(vtkTextProperty *property,
00054                                 const vtkUnicodeString& string);
00055   virtual vtkVector2i GetBounds(vtkTextProperty *property,
00056                                 const vtkStdString& string);
00058 
00060 
00064   virtual int RenderString(vtkTextProperty *property,
00065                            const vtkUnicodeString& string,
00066                            vtkImageData *data,
00067                            int textDims[2] = NULL);
00068   virtual int RenderString(vtkTextProperty *property,
00069                            const vtkStdString& string,
00070                            vtkImageData *data,
00071                            int textDims[2] = NULL);
00073 
00075   void DeepCopy(vtkQtStringToImage *utility);
00076 
00077 protected:
00078   vtkQtStringToImage();
00079   ~vtkQtStringToImage();
00080 
00081   class Internals;
00082   Internals* Implementation;
00083 
00084   vtkSmartPointer<vtkQImageToImageSource> QImageToImage;
00085 
00086 private:
00087   vtkQtStringToImage(const vtkQtStringToImage &); // Not implemented.
00088   void operator=(const vtkQtStringToImage &);   // Not implemented.
00089 };
00090 
00091 #endif //__vtkQtStringToImage_h