VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkOpenGLFreeTypeTextMapper.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 =========================================================================*/ 00029 #ifndef __vtkOpenGLFreeTypeTextMapper_h 00030 #define __vtkOpenGLFreeTypeTextMapper_h 00031 00032 #include "vtkRenderingFreeTypeOpenGLModule.h" // For export macro 00033 #include "vtkTextMapper.h" 00034 00035 class VTKRENDERINGFREETYPEOPENGL_EXPORT vtkOpenGLFreeTypeTextMapper 00036 : public vtkTextMapper 00037 { 00038 public: 00039 vtkTypeMacro(vtkOpenGLFreeTypeTextMapper, vtkTextMapper); 00040 static vtkOpenGLFreeTypeTextMapper *New(); 00041 virtual void PrintSelf(ostream& os, vtkIndent indent); 00042 00043 void SetInput(const char *inputString); 00044 00046 void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor); 00047 00051 virtual void ReleaseGraphicsResources(vtkWindow *); 00052 00054 virtual void GetSize(vtkViewport* viewport, int size[2]); 00055 00056 protected: 00057 vtkOpenGLFreeTypeTextMapper(); 00058 ~vtkOpenGLFreeTypeTextMapper(); 00059 00060 vtkTimeStamp SizeBuildTime; 00061 int LastSize[2]; 00062 int LastLargestDescender; 00063 int LineSize; 00064 int NumberOfLines; 00065 int NumberOfLinesAllocated; 00066 vtkTextMapper **TextLines; 00067 00069 00070 char *NextLine(const char *input, int lineNum); 00071 void GetMultiLineSize(vtkViewport* viewport, int size[2]); 00072 void RenderOverlayMultipleLines(vtkViewport *viewport, vtkActor2D *actor); 00074 00075 private: 00076 vtkOpenGLFreeTypeTextMapper(const vtkOpenGLFreeTypeTextMapper&); // Not implemented. 00077 void operator=(const vtkOpenGLFreeTypeTextMapper&); // Not implemented. 00078 }; 00079 00080 #endif