VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/FreeTypeOpenGL2/vtkOpenGLFreeTypeTextMapper.h
Go to the documentation of this file.
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 =========================================================================*/
00026 #ifndef vtkOpenGLFreeTypeTextMapper_h
00027 #define vtkOpenGLFreeTypeTextMapper_h
00028 
00029 #include "vtkRenderingFreeTypeOpenGL2Module.h" // For export macro
00030 #include "vtkTextMapper.h"
00031 
00032 class VTKRENDERINGFREETYPEOPENGL2_EXPORT vtkOpenGLFreeTypeTextMapper
00033   : public vtkTextMapper
00034 {
00035 public:
00036   vtkTypeMacro(vtkOpenGLFreeTypeTextMapper, vtkTextMapper);
00037   static vtkOpenGLFreeTypeTextMapper *New();
00038   virtual void PrintSelf(ostream& os, vtkIndent indent);
00039 
00040   void SetInput(const char *inputString);
00041 
00043   void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor);
00044 
00048   virtual void ReleaseGraphicsResources(vtkWindow *);
00049 
00051   virtual void GetSize(vtkViewport* viewport, int size[2]);
00052 
00053 protected:
00054   vtkOpenGLFreeTypeTextMapper();
00055   ~vtkOpenGLFreeTypeTextMapper();
00056 
00057   vtkTimeStamp  SizeBuildTime;
00058   int LastSize[2];
00059   int LastLargestDescender;
00060   int LineSize;
00061   int NumberOfLines;
00062   int NumberOfLinesAllocated;
00063   vtkTextMapper **TextLines;
00064 
00066 
00067   char *NextLine(const char *input, int lineNum);
00068   void GetMultiLineSize(vtkViewport* viewport, int size[2]);
00069   void RenderOverlayMultipleLines(vtkViewport *viewport, vtkActor2D *actor);
00071 
00072 private:
00073   vtkOpenGLFreeTypeTextMapper(const vtkOpenGLFreeTypeTextMapper&);  // Not implemented.
00074   void operator=(const vtkOpenGLFreeTypeTextMapper&);  // Not implemented.
00075 };
00076 
00077 #endif