VTK
dox/Rendering/vtkStringToImage.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkStringToImage.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 
00023 #ifndef __vtkStringToImage_h
00024 #define __vtkStringToImage_h
00025 
00026 #include "vtkObject.h"
00027 
00028 class vtkStdString;
00029 class vtkUnicodeString;
00030 class vtkTextProperty;
00031 class vtkImageData;
00032 class vtkVector2i;
00033 
00034 class VTK_RENDERING_EXPORT vtkStringToImage : public vtkObject
00035 {
00036 public:
00037   vtkTypeMacro(vtkStringToImage, vtkObject);
00038   virtual void PrintSelf(ostream &os, vtkIndent indent);
00039 
00041 
00050   virtual vtkVector2i GetBounds(vtkTextProperty *property,
00051                                 const vtkUnicodeString& string) = 0;
00052   virtual vtkVector2i GetBounds(vtkTextProperty *property,
00053                                 const vtkStdString& string) = 0;
00055 
00057 
00059   virtual int RenderString(vtkTextProperty *property,
00060                            const vtkUnicodeString& string,
00061                            vtkImageData *data) = 0;
00062   virtual int RenderString(vtkTextProperty *property,
00063                            const vtkStdString& string,
00064                            vtkImageData *data) = 0;
00066 
00068 
00070   virtual void SetScaleToPowerOfTwo(bool scale);
00071   vtkGetMacro(ScaleToPowerOfTwo, bool)
00073 
00074 protected:
00075   vtkStringToImage();
00076   ~vtkStringToImage();
00077 
00078   bool Antialias;
00079   bool ScaleToPowerOfTwo;
00080 
00081 private:
00082   vtkStringToImage(const vtkStringToImage &); // Not implemented.
00083   void operator=(const vtkStringToImage &);   // Not implemented.
00084 };
00085 
00086 #endif //__vtkStringToImage_h