VTK
vtkOpenGLFreeTypeTextMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLFreeTypeTextMapper.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkOpenGLFreeTypeTextMapper_h
27 #define vtkOpenGLFreeTypeTextMapper_h
28 
29 #include "vtkRenderingFreeTypeOpenGL2Module.h" // For export macro
30 #include "vtkTextMapper.h"
31 
32 class VTKRENDERINGFREETYPEOPENGL2_EXPORT vtkOpenGLFreeTypeTextMapper
33  : public vtkTextMapper
34 {
35 public:
38  virtual void PrintSelf(ostream& os, vtkIndent indent);
39 
40  void SetInput(const char *inputString);
41 
43  void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor);
44 
48  virtual void ReleaseGraphicsResources(vtkWindow *);
49 
51  virtual void GetSize(vtkViewport* viewport, int size[2]);
52 
53 protected:
56 
57  vtkTimeStamp SizeBuildTime;
58  int LastSize[2];
59  int LastLargestDescender;
60  int LineSize;
61  int NumberOfLines;
62  int NumberOfLinesAllocated;
63  vtkTextMapper **TextLines;
64 
66 
67  char *NextLine(const char *input, int lineNum);
68  void GetMultiLineSize(vtkViewport* viewport, int size[2]);
69  void RenderOverlayMultipleLines(vtkViewport *viewport, vtkActor2D *actor);
71 
72 private:
73  vtkOpenGLFreeTypeTextMapper(const vtkOpenGLFreeTypeTextMapper&); // Not implemented.
74  void operator=(const vtkOpenGLFreeTypeTextMapper&); // Not implemented.
75 };
76 
77 #endif
GLsizeiptr size
Definition: vtkgl.h:11843
virtual void GetSize(vtkViewport *, int size[2])
static vtkTextMapper * New()
GLenum GLenum GLenum input
Definition: vtkgl.h:15941
abstract specification for Viewports
Definition: vtkViewport.h:46
a actor that draws 2D data
Definition: vtkActor2D.h:44
record modification and/or execution time
Definition: vtkTimeStamp.h:34
virtual void SetInput(const char *)
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:632
2D text annotation
Definition: vtkTextMapper.h:59
window superclass for vtkRenderWindow
Definition: vtkWindow.h:33
void ReleaseGraphicsResources(vtkWindow *)
a simple class to control print indentation
Definition: vtkIndent.h:38
void RenderOverlay(vtkViewport *, vtkActor2D *)
void PrintSelf(ostream &os, vtkIndent indent)