VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTextRendererStringToImage.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 00021 #ifndef __vtkTextRendererStringToImage_h 00022 #define __vtkTextRendererStringToImage_h 00023 00024 #include "vtkRenderingFreeTypeModule.h" // For export macro 00025 #include "vtkStringToImage.h" 00026 00027 class VTKRENDERINGFREETYPE_EXPORT vtkTextRendererStringToImage : 00028 public vtkStringToImage 00029 { 00030 public: 00031 vtkTypeMacro(vtkTextRendererStringToImage, vtkStringToImage); 00032 virtual void PrintSelf(ostream &os, vtkIndent indent); 00033 00034 static vtkTextRendererStringToImage *New(); 00035 00037 00046 virtual vtkVector2i GetBounds(vtkTextProperty *property, 00047 const vtkUnicodeString& string); 00048 virtual vtkVector2i GetBounds(vtkTextProperty *property, 00049 const vtkStdString& string); 00051 00053 00059 virtual int RenderString(vtkTextProperty *property, 00060 const vtkUnicodeString& string, 00061 vtkImageData *data, 00062 int textDims[2] = NULL); 00063 virtual int RenderString(vtkTextProperty *property, 00064 const vtkStdString& string, 00065 vtkImageData *data, 00066 int textDims[2] = NULL); 00068 00071 virtual void SetScaleToPowerOfTwo(bool scale); 00072 00074 void DeepCopy(vtkTextRendererStringToImage *utility); 00075 00076 protected: 00077 vtkTextRendererStringToImage(); 00078 ~vtkTextRendererStringToImage(); 00079 00080 class Internals; 00081 Internals* Implementation; 00082 00083 private: 00084 vtkTextRendererStringToImage(const vtkTextRendererStringToImage &); // Not implemented. 00085 void operator=(const vtkTextRendererStringToImage &); // Not implemented. 00086 }; 00087 00088 #endif //__vtkTextRendererStringToImage_h