VTK
|
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 "vtkRenderingCoreModule.h" // For export macro 00027 #include "vtkObject.h" 00028 00029 class vtkStdString; 00030 class vtkUnicodeString; 00031 class vtkTextProperty; 00032 class vtkImageData; 00033 class vtkVector2i; 00034 00035 class VTKRENDERINGCORE_EXPORT vtkStringToImage : public vtkObject 00036 { 00037 public: 00038 vtkTypeMacro(vtkStringToImage, vtkObject); 00039 virtual void PrintSelf(ostream &os, vtkIndent indent); 00040 00042 00051 virtual vtkVector2i GetBounds(vtkTextProperty *property, 00052 const vtkUnicodeString& string) = 0; 00053 virtual vtkVector2i GetBounds(vtkTextProperty *property, 00054 const vtkStdString& string) = 0; 00056 00058 00064 virtual int RenderString(vtkTextProperty *property, 00065 const vtkUnicodeString& string, 00066 vtkImageData *data, 00067 int textDims[2] = NULL) = 0; 00068 virtual int RenderString(vtkTextProperty *property, 00069 const vtkStdString& string, 00070 vtkImageData *data, 00071 int text_dims[2] = NULL) = 0; 00073 00075 00077 virtual void SetScaleToPowerOfTwo(bool scale); 00078 vtkGetMacro(ScaleToPowerOfTwo, bool) 00080 00081 protected: 00082 vtkStringToImage(); 00083 ~vtkStringToImage(); 00084 00085 bool Antialias; 00086 bool ScaleToPowerOfTwo; 00087 00088 private: 00089 vtkStringToImage(const vtkStringToImage &); // Not implemented. 00090 void operator=(const vtkStringToImage &); // Not implemented. 00091 }; 00092 00093 #endif //__vtkStringToImage_h